From d2f5451b3a6fb5687dc29f1deea0c8bca9164fd4 Mon Sep 17 00:00:00 2001 From: Jerome Thayananthajothy Date: Tue, 3 Sep 2024 09:36:13 +0100 Subject: [PATCH] Update gh actions and add forge gh publisher --- .github/workflows/release.yml | 72 ----------------------------------- forge.config.ts | 17 +++++++++ 2 files changed, 17 insertions(+), 72 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6689936..e1c2a03 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -196,75 +196,3 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} AWS_REGION: ${{ secrets.R2_REGION }} shell: bash - - create-release: - needs: [build-macos, build-linux, build-windows] - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Extract version from package.json - run: | - VERSION=$(node -e "console.log(require('./package.json').version);") - echo "VERSION=$VERSION" >> $GITHUB_ENV - - - name: Create release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - with: - tag_name: v${{ env.VERSION }} - release_name: v${{ env.VERSION }} - body: | - Changes in this Release - draft: true - prerelease: false - - - name: Download build artifacts (macos x64) - uses: actions/download-artifact@v3 - with: - name: build-artifacts-macos-x64 - path: artifacts - - - name: Download build artifacts (macos arm64) - uses: actions/download-artifact@v3 - with: - name: build-artifacts-macos-arm64 - path: artifacts - - - name: Download build artifacts (linux x64) - uses: actions/download-artifact@v3 - with: - name: build-artifacts-linux-x64 - path: artifacts - - - name: Download build artifacts (linux arm64) - uses: actions/download-artifact@v3 - with: - name: build-artifacts-linux-arm64 - path: artifacts - - - name: Download build artifacts (windows x64) - uses: actions/download-artifact@v3 - with: - name: build-artifacts-windows-x64 - path: artifacts - - - name: Download build artifacts (windows arm64) - uses: actions/download-artifact@v3 - with: - name: build-artifacts-windows-arm64 - path: artifacts - - - name: Upload release assets - run: | - for file in $(find artifacts/ -type f); do - echo "Uploading $(basename "$file")" - gh release upload ${{ steps.create_release.outputs.upload_url }} "$file" --clobber - done - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - shell: bash diff --git a/forge.config.ts b/forge.config.ts index ebe73a9..1cffb99 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -123,6 +123,23 @@ const config: ForgeConfig = { [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, [FuseV1Options.OnlyLoadAppFromAsar]: true, }), + ], + publishers: [ + { + name: '@electron-forge/publisher-github', + config: { + authToken: process.env.GH_TOKEN, + repository: { + owner: 'stellar-comet', + name: 'comet', + }, + tagPrefix: 'v', + prerelease: false, + draft: true, + force: true, + generateReleaseNotes: true + } + } ] };