Release #13
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*" | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| if: >- | |
| github.event_name == 'workflow_dispatch' || | |
| github.event_name == 'push' || | |
| ( | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.merged == true && | |
| startsWith(github.event.pull_request.title, 'chore: release') | |
| ) | |
| runs-on: macos-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get version from package.json | |
| id: version | |
| run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: bun install --frozen-lockfile | |
| - name: Rebuild native modules for Electron | |
| run: bun run rebuild:electron-deps | |
| - name: Build desktop app | |
| run: bun run build:desktop | |
| - name: Package unpacked macOS app bundle | |
| run: bunx --bun electron-builder --config electron-builder.yml --dir | |
| - name: Prepare internal macOS release bundle | |
| run: bun run scripts/prepare-macos-release-bundle.mjs | |
| - name: Create GitHub release and upload app bundle zip | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ steps.version.outputs.version }} | |
| name: v${{ steps.version.outputs.version }} | |
| generate_release_notes: true | |
| files: release/Stave-macOS.zip |