Release #12
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: | |
| workflow_run: | |
| workflows: [CI] | |
| types: [completed] | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| # ── Read version and create tag ──────────────────────── | |
| version: | |
| # Only run if CI passed and was triggered by a push (not a PR) | |
| if: > | |
| github.event.workflow_run.conclusion == 'success' && | |
| github.event.workflow_run.event == 'push' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| outputs: | |
| version: ${{ steps.pkg.outputs.version }} | |
| tag: ${{ steps.pkg.outputs.tag }} | |
| exists: ${{ steps.check.outputs.exists }} | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| - name: Read version from package.json | |
| id: pkg | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "tag=v$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "Version: $VERSION" | |
| - name: Check if tag already exists | |
| id: check | |
| run: | | |
| if git ls-remote --tags origin "refs/tags/v${{ steps.pkg.outputs.version }}" | grep -q .; then | |
| echo "exists=true" >> "$GITHUB_OUTPUT" | |
| echo "Tag v${{ steps.pkg.outputs.version }} already exists, skipping release" | |
| else | |
| echo "exists=false" >> "$GITHUB_OUTPUT" | |
| echo "New version v${{ steps.pkg.outputs.version }}, will create release" | |
| fi | |
| # ── macOS (unsigned) ─────────────────────────────────── | |
| build-mac: | |
| needs: version | |
| if: needs.version.outputs.exists == 'false' | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build macOS DMG (ad-hoc signed) | |
| run: npm run build:mac | |
| - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | |
| with: | |
| name: mac-dmg | |
| path: dist-electron/*.dmg | |
| # ── Windows (unsigned) ──────────────────────────────── | |
| build-win: | |
| needs: version | |
| if: needs.version.outputs.exists == 'false' | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build Windows EXE (unsigned) | |
| run: npm run build:win | |
| - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | |
| with: | |
| name: win-exe | |
| path: dist-electron/*.exe | |
| # ── Linux ────────────────────────────────────────────── | |
| build-linux: | |
| needs: version | |
| if: needs.version.outputs.exists == 'false' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build Linux AppImage | |
| run: npm run build:linux | |
| - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | |
| with: | |
| name: linux-appimage | |
| path: dist-electron/*.AppImage | |
| # ── Create tag & GitHub Release ──────────────────────── | |
| release: | |
| needs: [version, build-mac, build-win, build-linux] | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| - name: Create tag | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git tag -a "${{ needs.version.outputs.tag }}" -m "Release ${{ needs.version.outputs.tag }}" | |
| git push origin "${{ needs.version.outputs.tag }}" | |
| - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3 | |
| with: | |
| tag_name: ${{ needs.version.outputs.tag }} | |
| name: Slate ${{ needs.version.outputs.tag }} | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| body: | | |
| ## Installation notes | |
| These builds are not signed with an official certificate, so your OS may show a security warning when installing. | |
| - **macOS**: Right-click the app → Open, then click Open in the dialog. If macOS says the app is "damaged", run: `xattr -cr /Applications/Slate.app` | |
| - **Windows**: Click "More info" → "Run anyway" | |
| - **Linux**: `chmod +x` the AppImage before running | |
| files: | | |
| artifacts/**/*.dmg | |
| artifacts/**/*.exe | |
| artifacts/**/*.AppImage |