Skip to content

Commit

Permalink
Update gh actions and add forge gh publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
Thavarshan committed Sep 3, 2024
1 parent 4bec75e commit d2f5451
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 72 deletions.
72 changes: 0 additions & 72 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
]
};

Expand Down

0 comments on commit d2f5451

Please sign in to comment.