Skip to content

Commit 73442dd

Browse files
committed
ci: add Electron build process to release workflow
Add steps to build and upload Electron app artifacts as part of the release workflow. This includes setting up Node.js, installing dependencies, and building the app for different platforms (Windows, macOS, Linux). The built artifacts are then uploaded as release assets.
1 parent 4354ad4 commit 73442dd

File tree

1 file changed

+52
-2
lines changed

1 file changed

+52
-2
lines changed

.github/workflows/update-stable.yml

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,64 @@ jobs:
8888
env:
8989
NEW_VERSION: ${{ steps.bump_version.outputs.new_version }}
9090
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91-
9291
run: .github/scripts/generate-changelog.sh
9392

9493
- name: Get the latest commit hash and version tag
9594
run: |
9695
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
9796
echo "NEW_VERSION=${{ steps.bump_version.outputs.new_version }}" >> $GITHUB_ENV
9897
98+
# Electron Build Process (added)
99+
- name: Checkout Electron App
100+
uses: actions/checkout@v4
101+
with:
102+
fetch-depth: 0
103+
104+
- name: Setup Node.js and pnpm for Electron
105+
uses: actions/setup-node@v4
106+
with:
107+
node-version: '18'
108+
109+
- name: Install pnpm for Electron
110+
uses: pnpm/action-setup@v2
111+
with:
112+
version: latest
113+
run_install: true
114+
115+
- name: Install Dependencies for Electron
116+
run: pnpm install
117+
118+
- name: Install Linux dependencies for Electron
119+
if: runner.os == 'Linux'
120+
run: |
121+
sudo apt-get update
122+
sudo apt-get install -y rpm
123+
124+
- name: Build Electron app
125+
run: |
126+
if [ "$RUNNER_OS" == "Windows" ]; then
127+
pnpm run electron:build:win
128+
elif [ "$RUNNER_OS" == "macOS" ]; then
129+
pnpm run electron:build:mac
130+
else
131+
pnpm run electron:build:linux
132+
fi
133+
134+
- name: Upload Electron Build as Release Assets
135+
uses: softprops/action-gh-release@v2
136+
with:
137+
tag_name: v${{ steps.bump_version.outputs.new_version }}
138+
name: "Electron Release v${{ steps.bump_version.outputs.new_version }}"
139+
files: |
140+
dist/*.exe
141+
dist/*.dmg
142+
dist/*.deb
143+
dist/*.AppImage
144+
dist/*.zip
145+
env:
146+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
147+
148+
# Commit and Tag Release
99149
- name: Commit and Tag Release
100150
run: |
101151
git pull
@@ -124,4 +174,4 @@ jobs:
124174
gh release create "$VERSION" \
125175
--title "Release $VERSION" \
126176
--notes-file release_notes.md \
127-
--target stable
177+
--target stable

0 commit comments

Comments
 (0)