feat: add electron-builder packaging and GitHub Releases publishing #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, macos-latest, ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 11 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build & publish | |
| shell: bash | |
| run: | | |
| pnpm --filter @codingcode/desktop run bundle:backend | |
| pnpm --filter @codingcode/desktop run build | |
| if [ "$RUNNER_OS" = "Windows" ]; then PLAT=--win; \ | |
| elif [ "$RUNNER_OS" = "macOS" ]; then PLAT=--mac; \ | |
| else PLAT=--linux; fi | |
| pnpm --filter @codingcode/desktop exec electron-builder $PLAT --publish always | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |