mirror of
https://github.com/colanode/colanode.git
synced 2025-12-16 11:47:47 +01:00
Add GitHub release workflow for publishing the app
This commit is contained in:
57
.github/workflows/publish-app.yml
vendored
Normal file
57
.github/workflows/publish-app.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Publish App
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
# Set VERSION for Unix-like systems
|
||||
- name: Set VERSION (Unix)
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||
|
||||
# Set VERSION for Windows
|
||||
- name: Set VERSION (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
shell: pwsh
|
||||
run: |
|
||||
$version = $env:GITHUB_REF -replace '^refs/tags/v',''
|
||||
echo "VERSION=$version" >> $env:GITHUB_ENV
|
||||
|
||||
- name: Update package.json version
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "$RUNNER_OS" == "Windows" ]; then
|
||||
npm version ${VERSION} --no-git-tag-version
|
||||
else
|
||||
npm version $VERSION --no-git-tag-version
|
||||
fi
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build Electron App
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
run: npm run make
|
||||
|
||||
- name: Publish Release to GitHub
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
run: npm run publish
|
||||
@@ -24,6 +24,7 @@ const config: ForgeConfig = {
|
||||
// /^\/node_modules/
|
||||
],
|
||||
extraResource: ['assets'],
|
||||
icon: 'assets/icon', // Path to the icon file. Works for macOS and Windows, but not for Linux.
|
||||
},
|
||||
rebuildConfig: {},
|
||||
makers: [
|
||||
@@ -32,6 +33,18 @@ const config: ForgeConfig = {
|
||||
new MakerRpm({}),
|
||||
new MakerDeb({}),
|
||||
],
|
||||
publishers: [
|
||||
{
|
||||
name: '@electron-forge/publisher-github',
|
||||
config: {
|
||||
repository: {
|
||||
owner: 'neuronapp',
|
||||
name: 'neuron',
|
||||
},
|
||||
prerelease: true,
|
||||
}
|
||||
}
|
||||
],
|
||||
plugins: [
|
||||
new VitePlugin({
|
||||
// `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.
|
||||
|
||||
Reference in New Issue
Block a user