fix(release): Trigger Homebrew update on publish + bump to v0.0.34 (#… #42
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: | |
| - '*' | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25.3' | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for tags | |
| - name: Build for Linux AMD64 | |
| env: | |
| GOOS: linux | |
| GOARCH: amd64 | |
| POSTHOG_WEB_ANALYTICS: ${{ secrets.POSTHOG_WEB_ANALYTICS }} | |
| run: | | |
| cd sourcecode-parser | |
| gitCommit=$(git describe --tags) | |
| projectVersion=$(cat VERSION) | |
| posthogkey=$(echo $POSTHOG_WEB_ANALYTICS) | |
| go build -ldflags="-s -w -X github.com/shivasurya/code-pathfinder/sourcecode-parser/cmd.Version=${projectVersion} -X github.com/shivasurya/code-pathfinder/sourcecode-parser/cmd.GitCommit=${gitCommit} -X github.com/shivasurya/code-pathfinder/sourcecode-parser/analytics.PublicKey=${posthogkey}" -v -o pathfinder-linux-amd64 . | |
| chmod +x pathfinder-linux-amd64 | |
| - name: Calculate SHA256 | |
| run: | | |
| cd sourcecode-parser | |
| sha256sum pathfinder-linux-amd64 > pathfinder-linux-amd64.sha256sum.txt | |
| cp pathfinder-linux-amd64 pathfinder | |
| tar -czvf pathfinder-linux-amd64.tar.gz pathfinder | |
| - name: Upload Linux Release Asset | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pathfinder-linux-amd64 | |
| path: | | |
| sourcecode-parser/pathfinder-linux-amd64 | |
| sourcecode-parser/pathfinder-linux-amd64.sha256sum.txt | |
| sourcecode-parser/pathfinder-linux-amd64.tar.gz | |
| build-linux-arm64: | |
| runs-on: ubuntu-24.04-arm # Native ARM64 runner (public repos only) | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25.3' | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for tags | |
| - name: Build for Linux ARM64 | |
| env: | |
| GOOS: linux | |
| GOARCH: arm64 | |
| CGO_ENABLED: 1 # Required for tree-sitter | |
| POSTHOG_WEB_ANALYTICS: ${{ secrets.POSTHOG_WEB_ANALYTICS }} | |
| run: | | |
| cd sourcecode-parser | |
| gitCommit=$(git describe --tags) | |
| projectVersion=$(cat VERSION) | |
| posthogkey=$(echo $POSTHOG_WEB_ANALYTICS) | |
| go build -ldflags="-s -w -X github.com/shivasurya/code-pathfinder/sourcecode-parser/cmd.Version=${projectVersion} -X github.com/shivasurya/code-pathfinder/sourcecode-parser/cmd.GitCommit=${gitCommit} -X github.com/shivasurya/code-pathfinder/sourcecode-parser/analytics.PublicKey=${posthogkey}" -v -o pathfinder-linux-arm64 . | |
| chmod +x pathfinder-linux-arm64 | |
| - name: Calculate SHA256 | |
| run: | | |
| cd sourcecode-parser | |
| sha256sum pathfinder-linux-arm64 > pathfinder-linux-arm64.sha256sum.txt | |
| cp pathfinder-linux-arm64 pathfinder | |
| tar -czvf pathfinder-linux-arm64.tar.gz pathfinder | |
| - name: Upload Linux ARM64 Release Asset | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pathfinder-linux-arm64 | |
| path: | | |
| sourcecode-parser/pathfinder-linux-arm64 | |
| sourcecode-parser/pathfinder-linux-arm64.sha256sum.txt | |
| sourcecode-parser/pathfinder-linux-arm64.tar.gz | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25.3' | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for tags | |
| - name: Build for Windows AMD64 | |
| env: | |
| GOOS: windows | |
| GOARCH: amd64 | |
| POSTHOG_WEB_ANALYTICS: ${{ secrets.POSTHOG_WEB_ANALYTICS }} | |
| run: | | |
| cd sourcecode-parser | |
| $gitCommit = (git describe --tags).Trim() | |
| $projectVersion = Get-Content VERSION | |
| $posthogkey=$env:POSTHOG_WEB_ANALYTICS | |
| go build -ldflags="-s -w -X github.com/shivasurya/code-pathfinder/sourcecode-parser/cmd.Version=${projectVersion} -X github.com/shivasurya/code-pathfinder/sourcecode-parser/cmd.GitCommit=${gitCommit} -X github.com/shivasurya/code-pathfinder/sourcecode-parser/analytics.PublicKey=${posthogkey}" -v -o pathfinder-windows-amd64.exe . | |
| - name: Calculate SHA256 | |
| run: | | |
| cd sourcecode-parser | |
| Get-FileHash -Algorithm SHA256 pathfinder-windows-amd64.exe | Select-Object Hash | Out-File -Encoding UTF8 pathfinder-windows-amd64.exe.sha256sum.txt | |
| Copy-Item pathfinder-windows-amd64.exe pathfinder.exe | |
| Compress-Archive -Path pathfinder.exe -DestinationPath pathfinder-windows-amd64.zip | |
| - name: Upload Windows Release Asset | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pathfinder-windows-amd64 | |
| path: | | |
| sourcecode-parser/pathfinder-windows-amd64.exe | |
| sourcecode-parser/pathfinder-windows-amd64.exe.sha256sum.txt | |
| sourcecode-parser/pathfinder-windows-amd64.zip | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25.3' | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for tags | |
| - name: Build for macOS ARM64 | |
| env: | |
| GOOS: darwin | |
| GOARCH: arm64 | |
| POSTHOG_WEB_ANALYTICS: ${{ secrets.POSTHOG_WEB_ANALYTICS }} | |
| run: | | |
| cd sourcecode-parser | |
| gitCommit=$(git describe --tags) | |
| projectVersion=$(cat VERSION) | |
| posthogkey=$(echo $POSTHOG_WEB_ANALYTICS) | |
| go build -ldflags="-s -w -X github.com/shivasurya/code-pathfinder/sourcecode-parser/cmd.Version=${projectVersion} -X github.com/shivasurya/code-pathfinder/sourcecode-parser/cmd.GitCommit=${gitCommit} -X github.com/shivasurya/code-pathfinder/sourcecode-parser/analytics.PublicKey=${posthogkey}" -v -o pathfinder-darwin-arm64 . | |
| chmod +x pathfinder-darwin-arm64 | |
| - name: Calculate SHA256 | |
| run: | | |
| cd sourcecode-parser | |
| shasum -a 256 pathfinder-darwin-arm64 > pathfinder-darwin-arm64.sha256sum.txt | |
| cp pathfinder-darwin-arm64 pathfinder | |
| tar -czvf pathfinder-darwin-arm64.tar.gz pathfinder | |
| - name: Upload macOS Release Asset | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pathfinder-darwin-arm64 | |
| path: | | |
| sourcecode-parser/pathfinder-darwin-arm64 | |
| sourcecode-parser/pathfinder-darwin-arm64.sha256sum.txt | |
| sourcecode-parser/pathfinder-darwin-arm64.tar.gz | |
| build-macos-intel: | |
| runs-on: macos-13 # Last Intel-based macOS runner | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25.3' | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for tags | |
| - name: Build for macOS AMD64 | |
| env: | |
| GOOS: darwin | |
| GOARCH: amd64 | |
| CGO_ENABLED: 1 # Required for tree-sitter | |
| POSTHOG_WEB_ANALYTICS: ${{ secrets.POSTHOG_WEB_ANALYTICS }} | |
| run: | | |
| cd sourcecode-parser | |
| gitCommit=$(git describe --tags) | |
| projectVersion=$(cat VERSION) | |
| posthogkey=$(echo $POSTHOG_WEB_ANALYTICS) | |
| go build -ldflags="-s -w -X github.com/shivasurya/code-pathfinder/sourcecode-parser/cmd.Version=${projectVersion} -X github.com/shivasurya/code-pathfinder/sourcecode-parser/cmd.GitCommit=${gitCommit} -X github.com/shivasurya/code-pathfinder/sourcecode-parser/analytics.PublicKey=${posthogkey}" -v -o pathfinder-darwin-amd64 . | |
| chmod +x pathfinder-darwin-amd64 | |
| - name: Calculate SHA256 | |
| run: | | |
| cd sourcecode-parser | |
| shasum -a 256 pathfinder-darwin-amd64 > pathfinder-darwin-amd64.sha256sum.txt | |
| cp pathfinder-darwin-amd64 pathfinder | |
| tar -czvf pathfinder-darwin-amd64.tar.gz pathfinder | |
| - name: Upload macOS Intel Release Asset | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pathfinder-darwin-amd64 | |
| path: | | |
| sourcecode-parser/pathfinder-darwin-amd64 | |
| sourcecode-parser/pathfinder-darwin-amd64.sha256sum.txt | |
| sourcecode-parser/pathfinder-darwin-amd64.tar.gz | |
| release: | |
| needs: [build-linux, build-linux-arm64, build-windows, build-macos, build-macos-intel] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download Linux Release Asset | |
| uses: actions/[email protected] | |
| with: | |
| name: pathfinder-linux-amd64 | |
| - name: Download Linux ARM64 Release Asset | |
| uses: actions/[email protected] | |
| with: | |
| name: pathfinder-linux-arm64 | |
| - name: Download Windows Release Asset | |
| uses: actions/[email protected] | |
| with: | |
| name: pathfinder-windows-amd64 | |
| - name: Download macOS ARM64 Release Asset | |
| uses: actions/[email protected] | |
| with: | |
| name: pathfinder-darwin-arm64 | |
| - name: Download macOS Intel Release Asset | |
| uses: actions/[email protected] | |
| with: | |
| name: pathfinder-darwin-amd64 | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref }} | |
| release_name: Release ${{ github.ref }} | |
| draft: true | |
| prerelease: false | |
| - name: Upload Linux Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-linux-amd64 | |
| asset_name: pathfinder-linux-amd64 | |
| asset_content_type: application/octet-stream | |
| - name: Upload Linux tar.gz Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-linux-amd64.tar.gz | |
| asset_name: pathfinder-linux-amd64.tar.gz | |
| asset_content_type: application/gzip | |
| - name: Upload Linux ARM64 Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-linux-arm64 | |
| asset_name: pathfinder-linux-arm64 | |
| asset_content_type: application/octet-stream | |
| - name: Upload Linux ARM64 tar.gz Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-linux-arm64.tar.gz | |
| asset_name: pathfinder-linux-arm64.tar.gz | |
| asset_content_type: application/gzip | |
| - name: Upload Windows Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-windows-amd64.exe | |
| asset_name: pathfinder-windows-amd64.exe | |
| asset_content_type: application/octet-stream | |
| - name: Upload Windows zip Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-windows-amd64.zip | |
| asset_name: pathfinder-windows-amd64.zip | |
| asset_content_type: application/zip | |
| - name: Upload macOS Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-darwin-arm64 | |
| asset_name: pathfinder-darwin-arm64 | |
| asset_content_type: application/octet-stream | |
| - name: Upload macOS tar.gz Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-darwin-arm64.tar.gz | |
| asset_name: pathfinder-darwin-arm64.tar.gz | |
| asset_content_type: application/gzip | |
| - name: Upload macOS Intel Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-darwin-amd64 | |
| asset_name: pathfinder-darwin-amd64 | |
| asset_content_type: application/octet-stream | |
| - name: Upload macOS Intel tar.gz Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-darwin-amd64.tar.gz | |
| asset_name: pathfinder-darwin-amd64.tar.gz | |
| asset_content_type: application/gzip | |
| - name: Upload Linux SHA256 Checksum | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-linux-amd64.sha256sum.txt | |
| asset_name: pathfinder-linux-amd64.sha256sum.txt | |
| asset_content_type: text/plain | |
| - name: Upload Windows SHA256 Checksum | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-windows-amd64.exe.sha256sum.txt | |
| asset_name: pathfinder-windows-amd64.exe.sha256sum.txt | |
| asset_content_type: text/plain | |
| - name: Upload macOS SHA256 Checksum | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-darwin-arm64.sha256sum.txt | |
| asset_name: pathfinder-darwin-arm64.sha256sum.txt | |
| asset_content_type: text/plain | |
| - name: Upload Linux ARM64 SHA256 Checksum | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-linux-arm64.sha256sum.txt | |
| asset_name: pathfinder-linux-arm64.sha256sum.txt | |
| asset_content_type: text/plain | |
| - name: Upload macOS Intel SHA256 Checksum | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./pathfinder-darwin-amd64.sha256sum.txt | |
| asset_name: pathfinder-darwin-amd64.sha256sum.txt | |
| asset_content_type: text/plain |