Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

Add GitHub release workflow for publishing the app

Ylber Gashi8bbd4fffcc1d
diff --git a/.github/workflows/publish-app.yml b/.github/workflows/publish-app.yml
new file mode 100644
index 00000000..bebf2ce6
--- /dev/null
+++ b/.github/workflows/publish-app.yml
@@ -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
\ No newline at end of file
diff --git a/desktop/forge.config.ts b/desktop/forge.config.ts
index 36dc75e1..d79955af 100644
--- a/desktop/forge.config.ts
+++ b/desktop/forge.config.ts
@@ -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.