Fix per-tab input source drifting across windows; bump to 1.3.2 #20
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: 'Tag to release (e.g. v0.1.0). Must already exist.' | |
| required: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: macos-26 | |
| env: | |
| SIGNING_IDENTITY: ${{ secrets.SIGNING_IDENTITY }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_APP_PASSWORD: ${{ secrets.APPLE_APP_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| SPARKLE_PRIVATE_KEY: ${{ secrets.SPARKLE_PRIVATE_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.event.inputs.tag || github.ref }} | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Select Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Import Developer ID certificate | |
| env: | |
| BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | |
| P12_PASSWORD: ${{ secrets.P12_PASSWORD }} | |
| KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
| run: | | |
| set -euo pipefail | |
| CERT_PATH="$RUNNER_TEMP/cert.p12" | |
| KEYCHAIN_PATH="$RUNNER_TEMP/build.keychain-db" | |
| echo "$BUILD_CERTIFICATE_BASE64" | base64 --decode > "$CERT_PATH" | |
| security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | |
| security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH" | |
| security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" | |
| security import "$CERT_PATH" \ | |
| -P "$P12_PASSWORD" \ | |
| -A -t cert -f pkcs12 \ | |
| -k "$KEYCHAIN_PATH" | |
| security list-keychain -d user -s "$KEYCHAIN_PATH" $(security list-keychain -d user | xargs) | |
| security set-key-partition-list -S apple-tool:,apple:,codesign: \ | |
| -s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH" >/dev/null | |
| - name: Resolve tag | |
| id: resolve_tag | |
| run: | | |
| if [ -n "${{ github.event.inputs.tag }}" ]; then | |
| echo "tag=${{ github.event.inputs.tag }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Generate release notes | |
| id: notes | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG: ${{ steps.resolve_tag.outputs.tag }} | |
| run: | | |
| set -euo pipefail | |
| NOTES_MD="$RUNNER_TEMP/release_notes.md" | |
| NOTES_HTML="$RUNNER_TEMP/release_notes.html" | |
| # PR-based notes (uses .github/release.yml for categorization). | |
| gh api -X POST "/repos/${{ github.repository }}/releases/generate-notes" \ | |
| -f tag_name="$TAG" \ | |
| --jq .body > "$NOTES_MD" | |
| # If no PRs landed between the previous tag and this one, the body | |
| # only carries the "Full Changelog" link. Synthesize a Changes | |
| # section from git log so direct commits still appear in the notes. | |
| if ! grep -qF '## What' "$NOTES_MD"; then | |
| # Fetch full history so describe/log can reach the previous tag. | |
| git fetch --tags --unshallow 2>/dev/null || git fetch --tags | |
| PREV_TAG="$(git describe --tags --abbrev=0 "$TAG^" 2>/dev/null || true)" | |
| RANGE="${PREV_TAG:+$PREV_TAG..}$TAG" | |
| COMMITS="$(git log --no-merges \ | |
| --pretty=format:"- %s ([\`%h\`](https://github.com/${{ github.repository }}/commit/%H))" \ | |
| "$RANGE")" | |
| if [ -n "$COMMITS" ]; then | |
| { | |
| echo "## Changes" | |
| echo | |
| echo "$COMMITS" | |
| echo | |
| cat "$NOTES_MD" | |
| } > "$NOTES_MD.new" | |
| mv "$NOTES_MD.new" "$NOTES_MD" | |
| fi | |
| fi | |
| echo "--- release notes (markdown) ---" | |
| cat "$NOTES_MD" | |
| echo "--- end ---" | |
| gh api -X POST /markdown \ | |
| -F text=@"$NOTES_MD" \ | |
| -f mode=gfm \ | |
| -f context="${{ github.repository }}" > "$NOTES_HTML" | |
| echo "notes_md=$NOTES_MD" >> "$GITHUB_OUTPUT" | |
| echo "notes_html=$NOTES_HTML" >> "$GITHUB_OUTPUT" | |
| - name: Build, sign, notarize, and package | |
| env: | |
| SPARKLE_RELEASE_NOTES_FILE: ${{ steps.notes.outputs.notes_html }} | |
| run: ./scripts/package_release.sh | |
| - name: Upload artifacts to GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TAG: ${{ steps.resolve_tag.outputs.tag }} | |
| NOTES_MD: ${{ steps.notes.outputs.notes_md }} | |
| run: | | |
| set -euo pipefail | |
| if ! gh release view "$TAG" >/dev/null 2>&1; then | |
| gh release create "$TAG" --title "Notchy $TAG" --notes-file "$NOTES_MD" | |
| fi | |
| ASSETS=(dist/Notchy-*.zip dist/Notchy-*.dmg) | |
| if [ -f dist/appcast.xml ]; then | |
| ASSETS+=(dist/appcast.xml) | |
| fi | |
| gh release upload "$TAG" "${ASSETS[@]}" --clobber | |
| - name: Clean up keychain | |
| if: always() | |
| run: | | |
| security delete-keychain "$RUNNER_TEMP/build.keychain-db" || true |