build: release v1.5.0 #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*' | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: Existing v* tag to release | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| env: | |
| RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }} | |
| jobs: | |
| resolve: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| sha: ${{ steps.release-ref.outputs.sha }} | |
| tag: ${{ steps.release-ref.outputs.tag }} | |
| steps: | |
| - name: Check out repository and tags | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Resolve immutable release commit | |
| id: release-ref | |
| shell: bash | |
| run: | | |
| if [[ ! "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.-]+)?$ ]]; then | |
| echo "Release tag must be a semver-like v* tag" >&2 | |
| exit 1 | |
| fi | |
| git show-ref --verify --quiet "refs/tags/$RELEASE_TAG" | |
| echo "tag=$RELEASE_TAG" >> "$GITHUB_OUTPUT" | |
| echo "sha=$(git rev-parse "$RELEASE_TAG^{commit}")" >> "$GITHUB_OUTPUT" | |
| macos: | |
| needs: resolve | |
| runs-on: macos-15 | |
| steps: | |
| - name: Check out release tag | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ needs.resolve.outputs.sha }} | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.29.2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.14.1 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Package, sign, and notarize macOS installers | |
| env: | |
| CSC_LINK: ${{ secrets.CSC_LINK }} | |
| CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| run: pnpm build && pnpm exec electron-builder --mac --x64 --arm64 --publish never | |
| - name: Upload macOS artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-macos | |
| if-no-files-found: error | |
| path: | | |
| dist/*.dmg | |
| dist/*.zip | |
| dist/*.yml | |
| dist/*.blockmap | |
| package: | |
| needs: resolve | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| platform: win | |
| artifact: windows | |
| - os: ubuntu-latest | |
| platform: linux | |
| artifact: linux | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Check out release tag | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ needs.resolve.outputs.sha }} | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.29.2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24.14.1 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Package application | |
| run: pnpm build && pnpm exec electron-builder --${{ matrix.platform }} --publish never | |
| - name: Upload release artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-${{ matrix.artifact }} | |
| if-no-files-found: error | |
| path: | | |
| dist/*.exe | |
| dist/*.snap | |
| dist/*.yml | |
| dist/*.blockmap | |
| release: | |
| needs: | |
| - resolve | |
| - macos | |
| - package | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download packaged artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: release-* | |
| path: release-artifacts | |
| merge-multiple: true | |
| - name: Create draft GitHub Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh release create "${{ needs.resolve.outputs.tag }}" release-artifacts/* --repo "$GITHUB_REPOSITORY" --draft --verify-tag --title "${{ needs.resolve.outputs.tag }}" --generate-notes |