From 02fa61549413082f9cf2eef0de3e19842b6221aa Mon Sep 17 00:00:00 2001 From: Ylber Gashi Date: Sun, 17 Nov 2024 19:17:23 +0100 Subject: [PATCH] Update GitHub Actions workflow and forge config for desktop app publishing --- .github/workflows/publish-app.yml | 3 +++ apps/desktop/forge.config.ts | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/.github/workflows/publish-app.yml b/.github/workflows/publish-app.yml index bebf2ce6..edaff216 100644 --- a/.github/workflows/publish-app.yml +++ b/.github/workflows/publish-app.yml @@ -36,6 +36,7 @@ jobs: - name: Update package.json version shell: bash + working-directory: apps/desktop run: | if [ "$RUNNER_OS" == "Windows" ]; then npm version ${VERSION} --no-git-tag-version @@ -49,9 +50,11 @@ jobs: - name: Build Electron App env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + working-directory: apps/desktop run: npm run make - name: Publish Release to GitHub env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + working-directory: apps/desktop run: npm run publish \ No newline at end of file diff --git a/apps/desktop/forge.config.ts b/apps/desktop/forge.config.ts index 9525dc8d..cab5f77d 100644 --- a/apps/desktop/forge.config.ts +++ b/apps/desktop/forge.config.ts @@ -35,6 +35,22 @@ const config: ForgeConfig = { new MakerRpm({}), new MakerDeb({}), ], + publishers: [ + { + name: '@electron-forge/publisher-github', + config: { + repository: { + owner: 'colanode', + name: 'colanode' + }, + // Publishing options: + // draft=true creates private release for review, + // prerelease=true marks as beta, false=stable/production + prerelease: false, + draft: true + } + } + ], plugins: [ new VitePlugin({ // `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.