Skip to content

Commit 0fafe5b

Browse files
committed
fix: split release workflow into explicit steps with matrix platform
1 parent 2c75f16 commit 0fafe5b

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
os: [windows-latest, macos-latest, ubuntu-latest]
16+
include:
17+
- os: windows-latest
18+
platform: win
19+
- os: macos-latest
20+
platform: mac
21+
- os: ubuntu-latest
22+
platform: linux
1723
runs-on: ${{ matrix.os }}
1824
steps:
1925
- name: Checkout
@@ -31,14 +37,13 @@ jobs:
3137
- name: Install dependencies
3238
run: pnpm install --frozen-lockfile
3339

34-
- name: Build & publish
35-
shell: bash
36-
run: |
37-
pnpm --filter @codingcode/desktop run bundle:backend
38-
pnpm --filter @codingcode/desktop run build
39-
if [ "$RUNNER_OS" = "Windows" ]; then PLAT=--win; \
40-
elif [ "$RUNNER_OS" = "macOS" ]; then PLAT=--mac; \
41-
else PLAT=--linux; fi
42-
pnpm --filter @codingcode/desktop exec electron-builder $PLAT --publish always
40+
- name: Bundle backend
41+
run: pnpm --filter @codingcode/desktop run bundle:backend
42+
43+
- name: Build Electron app
44+
run: pnpm --filter @codingcode/desktop run build
45+
46+
- name: Package & publish
47+
run: pnpm --filter @codingcode/desktop exec electron-builder --${{ matrix.platform }} --publish always
4348
env:
4449
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)