release: v2.5.2 #95
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*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run tests | |
| run: bun run test --timeout 30000 | |
| - name: Type check | |
| run: bun run typecheck | |
| build-macos: | |
| needs: test | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - target: bun-darwin-arm64 | |
| suffix: macos-arm64 | |
| - target: bun-darwin-x64 | |
| suffix: macos-x64 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Get version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Build main CLI | |
| run: | | |
| if [ "${{ matrix.target }}" = "bun-darwin-arm64" ]; then | |
| bun build src/index.ts --compile --outfile=supertag | |
| else | |
| bun build src/index.ts --compile --target=${{ matrix.target }} --outfile=supertag | |
| fi | |
| - name: Build Lite CLI | |
| run: | | |
| if [ "${{ matrix.target }}" = "bun-darwin-arm64" ]; then | |
| bun build src/cli-lite.ts --compile --outfile=supertag-lite | |
| else | |
| bun build src/cli-lite.ts --compile --target=${{ matrix.target }} --outfile=supertag-lite | |
| fi | |
| - name: Build MCP server | |
| run: | | |
| if [ "${{ matrix.target }}" = "bun-darwin-arm64" ]; then | |
| bun build src/mcp/index.ts --compile --outfile=supertag-mcp | |
| else | |
| bun build src/mcp/index.ts --compile --target=${{ matrix.target }} --outfile=supertag-mcp | |
| fi | |
| - name: Build export CLI | |
| run: | | |
| EXTERNAL_FLAGS="--external playwright --external playwright-core --external electron --external chromium-bidi" | |
| if [ "${{ matrix.target }}" = "bun-darwin-arm64" ]; then | |
| bun build export/index.ts --compile $EXTERNAL_FLAGS --outfile=supertag-export | |
| else | |
| bun build export/index.ts --compile --target=${{ matrix.target }} $EXTERNAL_FLAGS --outfile=supertag-export | |
| fi | |
| - name: Create distribution package | |
| run: | | |
| DIST_NAME="supertag-cli-${{ matrix.suffix }}" | |
| mkdir -p "$DIST_NAME" | |
| cp supertag "$DIST_NAME/" | |
| cp supertag-lite "$DIST_NAME/" | |
| cp supertag-mcp "$DIST_NAME/" | |
| cp supertag-export "$DIST_NAME/" | |
| cp export/package.json "$DIST_NAME/" | |
| cp README.md "$DIST_NAME/" | |
| cp README-LITE.md "$DIST_NAME/" | |
| cp -r docs "$DIST_NAME/" | |
| cp -r launchd "$DIST_NAME/" | |
| cp -r scripts "$DIST_NAME/" | |
| cp install.sh "$DIST_NAME/" | |
| cp uninstall.sh "$DIST_NAME/" | |
| zip -r "supertag-cli-v${{ steps.version.outputs.VERSION }}-${{ matrix.suffix }}.zip" "$DIST_NAME" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: supertag-cli-${{ matrix.suffix }} | |
| path: supertag-cli-v${{ steps.version.outputs.VERSION }}-${{ matrix.suffix }}.zip | |
| build-linux: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Get version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Build main CLI | |
| run: bun build src/index.ts --compile --target=bun-linux-x64 --outfile=supertag | |
| - name: Build Lite CLI | |
| run: bun build src/cli-lite.ts --compile --target=bun-linux-x64 --outfile=supertag-lite | |
| - name: Build MCP server | |
| run: bun build src/mcp/index.ts --compile --target=bun-linux-x64 --outfile=supertag-mcp | |
| - name: Build export CLI | |
| run: | | |
| EXTERNAL_FLAGS="--external playwright --external playwright-core --external electron --external chromium-bidi" | |
| bun build export/index.ts --compile --target=bun-linux-x64 $EXTERNAL_FLAGS --outfile=supertag-export | |
| - name: Create distribution package | |
| run: | | |
| DIST_NAME="supertag-cli-linux-x64" | |
| mkdir -p "$DIST_NAME" | |
| cp supertag "$DIST_NAME/" | |
| cp supertag-lite "$DIST_NAME/" | |
| cp supertag-mcp "$DIST_NAME/" | |
| cp supertag-export "$DIST_NAME/" | |
| cp export/package.json "$DIST_NAME/" | |
| cp README.md "$DIST_NAME/" | |
| cp README-LITE.md "$DIST_NAME/" | |
| cp -r docs "$DIST_NAME/" | |
| cp -r launchd "$DIST_NAME/" | |
| cp -r scripts "$DIST_NAME/" | |
| cp install.sh "$DIST_NAME/" | |
| cp uninstall.sh "$DIST_NAME/" | |
| zip -r "supertag-cli-v${{ steps.version.outputs.VERSION }}-linux-x64.zip" "$DIST_NAME" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: supertag-cli-linux-x64 | |
| path: supertag-cli-v${{ steps.version.outputs.VERSION }}-linux-x64.zip | |
| build-windows: | |
| needs: test | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Get version from tag | |
| id: version | |
| shell: pwsh | |
| run: | | |
| $version = "${{ github.ref_name }}" -replace '^v', '' | |
| echo "VERSION=$version" >> $env:GITHUB_OUTPUT | |
| - name: Build main CLI | |
| run: bun build src/index.ts --compile --outfile=supertag.exe | |
| - name: Build Lite CLI | |
| run: bun build src/cli-lite.ts --compile --outfile=supertag-lite.exe | |
| - name: Build MCP server | |
| run: bun build src/mcp/index.ts --compile --outfile=supertag-mcp.exe | |
| - name: Build export CLI | |
| run: bun build export/index.ts --compile --external playwright --external playwright-core --external electron --external chromium-bidi --outfile=supertag-export.exe | |
| - name: Create distribution package | |
| shell: pwsh | |
| run: | | |
| $distName = "supertag-cli-windows-x64" | |
| $version = "${{ steps.version.outputs.VERSION }}" | |
| New-Item -ItemType Directory -Force -Path $distName | |
| Copy-Item supertag.exe "$distName/" | |
| Copy-Item supertag-lite.exe "$distName/" | |
| Copy-Item supertag-mcp.exe "$distName/" | |
| Copy-Item supertag-export.exe "$distName/" | |
| Copy-Item export/package.json "$distName/" | |
| Copy-Item README.md "$distName/" | |
| Copy-Item README-LITE.md "$distName/" | |
| Copy-Item -Recurse docs "$distName/" | |
| Copy-Item -Recurse launchd "$distName/" | |
| Copy-Item -Recurse scripts "$distName/" | |
| Copy-Item install.ps1 "$distName/" | |
| Copy-Item uninstall.ps1 "$distName/" | |
| Compress-Archive -Path $distName -DestinationPath "supertag-cli-v$version-windows-x64.zip" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: supertag-cli-windows-x64 | |
| path: supertag-cli-v${{ steps.version.outputs.VERSION }}-windows-x64.zip | |
| release: | |
| needs: [build-macos, build-linux, build-windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Get version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: List artifacts | |
| run: find artifacts -type f -name "*.zip" | |
| - name: Create version-less copies for latest URLs | |
| run: | | |
| # Create copies without version numbers for /releases/latest/download/ URLs | |
| for platform in macos-arm64 macos-x64 linux-x64 windows-x64; do | |
| versioned=$(find artifacts -name "supertag-cli-v*-${platform}.zip" | head -1) | |
| if [ -n "$versioned" ]; then | |
| cp "$versioned" "artifacts/supertag-cli-${platform}.zip" | |
| echo "Created: artifacts/supertag-cli-${platform}.zip" | |
| fi | |
| done | |
| echo "Version-less copies created:" | |
| ls -la artifacts/*.zip 2>/dev/null || true | |
| - name: Extract changelog for this version | |
| id: changelog | |
| run: | | |
| # Extract changelog section for this version | |
| VERSION="${{ steps.version.outputs.VERSION }}" | |
| CHANGELOG=$(sed -n "/## \[$VERSION\]/,/## \[/p" CHANGELOG.md | sed '1d;$d' | head -50) | |
| if [ -z "$CHANGELOG" ]; then | |
| CHANGELOG="Release v$VERSION" | |
| fi | |
| # Write to file for multiline support | |
| echo "$CHANGELOG" > release_notes.md | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Supertag CLI v${{ steps.version.outputs.VERSION }} | |
| body_path: release_notes.md | |
| draft: false | |
| prerelease: false | |
| files: | | |
| artifacts/supertag-cli-macos-arm64/*.zip | |
| artifacts/supertag-cli-macos-x64/*.zip | |
| artifacts/supertag-cli-linux-x64/*.zip | |
| artifacts/supertag-cli-windows-x64/*.zip | |
| artifacts/supertag-cli-macos-arm64.zip | |
| artifacts/supertag-cli-macos-x64.zip | |
| artifacts/supertag-cli-linux-x64.zip | |
| artifacts/supertag-cli-windows-x64.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| update-homebrew: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Download release assets and compute SHA256 | |
| id: sha256 | |
| run: | | |
| VERSION="${{ steps.version.outputs.VERSION }}" | |
| # Download ARM64 and compute SHA256 | |
| curl -sL "https://github.com/jcfischer/supertag-cli/releases/download/v${VERSION}/supertag-cli-macos-arm64.zip" -o arm64.zip | |
| SHA_ARM64=$(sha256sum arm64.zip | cut -d' ' -f1) | |
| echo "SHA_ARM64=${SHA_ARM64}" >> $GITHUB_OUTPUT | |
| # Download x64 and compute SHA256 | |
| curl -sL "https://github.com/jcfischer/supertag-cli/releases/download/v${VERSION}/supertag-cli-macos-x64.zip" -o x64.zip | |
| SHA_X64=$(sha256sum x64.zip | cut -d' ' -f1) | |
| echo "SHA_X64=${SHA_X64}" >> $GITHUB_OUTPUT | |
| echo "ARM64 SHA256: ${SHA_ARM64}" | |
| echo "x64 SHA256: ${SHA_X64}" | |
| - name: Checkout homebrew-supertag | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: jcfischer/homebrew-supertag | |
| token: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| path: homebrew-tap | |
| - name: Update formula | |
| run: | | |
| VERSION="${{ steps.version.outputs.VERSION }}" | |
| SHA_ARM64="${{ steps.sha256.outputs.SHA_ARM64 }}" | |
| SHA_X64="${{ steps.sha256.outputs.SHA_X64 }}" | |
| cd homebrew-tap | |
| # Update version | |
| sed -i "s/version \"[^\"]*\"/version \"${VERSION}\"/" Formula/supertag.rb | |
| # Update ARM64 SHA256 (first sha256 in on_arm block) | |
| sed -i "/on_arm do/,/end/{s/sha256 \"[a-f0-9]*\"/sha256 \"${SHA_ARM64}\"/}" Formula/supertag.rb | |
| # Update x64 SHA256 (sha256 in on_intel block) | |
| sed -i "/on_intel do/,/end/{s/sha256 \"[a-f0-9]*\"/sha256 \"${SHA_X64}\"/}" Formula/supertag.rb | |
| echo "Updated formula:" | |
| head -20 Formula/supertag.rb | |
| - name: Commit and push | |
| run: | | |
| VERSION="${{ steps.version.outputs.VERSION }}" | |
| cd homebrew-tap | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git remote set-url origin "https://x-access-token:${{ secrets.HOMEBREW_TAP_TOKEN }}@github.com/jcfischer/homebrew-supertag.git" | |
| git add Formula/supertag.rb | |
| git commit -m "chore: bump to v${VERSION}" | |
| git push |