release: v0.3.16 #37
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 | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-mac: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - run: npm ci | |
| - name: Write Apple notary API key to file | |
| env: | |
| APPLE_NOTARY_API_KEY: ${{ secrets.APPLE_NOTARY_API_KEY }} | |
| run: | | |
| echo "$APPLE_NOTARY_API_KEY" > "$RUNNER_TEMP/notary-key.p8" | |
| - name: Import Apple Developer Certificate | |
| env: | |
| APPLE_DEVELOPER_CERTIFICATE_P12: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12 }} | |
| APPLE_DEVELOPER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} | |
| run: | | |
| echo "$APPLE_DEVELOPER_CERTIFICATE_P12" | base64 -d > certificate.p12 | |
| security create-keychain -p "$RUNNER_TEMP/keychain-password" build.keychain | |
| security default-keychain -s build.keychain | |
| security unlock-keychain -p "$RUNNER_TEMP/keychain-password" build.keychain | |
| security import certificate.p12 -k build.keychain -P "$APPLE_DEVELOPER_CERTIFICATE_PASSWORD" -T /usr/bin/codesign | |
| security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$RUNNER_TEMP/keychain-password" build.keychain | |
| security list-keychains -d user -s build.keychain | |
| rm certificate.p12 | |
| - run: npm run build:mac:dist | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| APPLE_API_KEY: ${{ runner.temp }}/notary-key.p8 | |
| APPLE_API_KEY_ID: ${{ secrets.APPLE_NOTARY_API_KEY_ID }} | |
| APPLE_API_ISSUER: ${{ secrets.APPLE_NOTARY_API_ISSUER_ID }} | |
| - name: Update release notes | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| # Extract the section for this version from CHANGELOG.md | |
| NOTES=$(awk "/^## \\[$VERSION\\]/{found=1} /^## \\[/{if(found>1) exit; found++} found" CHANGELOG.md) | |
| gh release edit "$GITHUB_REF_NAME" --draft=false --notes "$NOTES" |