chore: bump version to 2.1.0 across all components (#659) #67
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@v6 | |
| with: | |
| go-version: '1.26.1' | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| 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 sast-engine | |
| gitCommit=$(git describe --tags) | |
| projectVersion=$(cat VERSION) | |
| posthogkey=$(echo $POSTHOG_WEB_ANALYTICS) | |
| go build -ldflags="-s -w -X github.com/shivasurya/code-pathfinder/sast-engine/cmd.Version=${projectVersion} -X github.com/shivasurya/code-pathfinder/sast-engine/cmd.GitCommit=${gitCommit} -X github.com/shivasurya/code-pathfinder/sast-engine/analytics.PublicKey=${posthogkey}" -v -o pathfinder-linux-amd64 . | |
| chmod +x pathfinder-linux-amd64 | |
| - name: Calculate SHA256 | |
| run: | | |
| cd sast-engine | |
| 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: | | |
| sast-engine/pathfinder-linux-amd64 | |
| sast-engine/pathfinder-linux-amd64.sha256sum.txt | |
| sast-engine/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@v6 | |
| with: | |
| go-version: '1.26.1' | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| 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 sast-engine | |
| gitCommit=$(git describe --tags) | |
| projectVersion=$(cat VERSION) | |
| posthogkey=$(echo $POSTHOG_WEB_ANALYTICS) | |
| go build -ldflags="-s -w -X github.com/shivasurya/code-pathfinder/sast-engine/cmd.Version=${projectVersion} -X github.com/shivasurya/code-pathfinder/sast-engine/cmd.GitCommit=${gitCommit} -X github.com/shivasurya/code-pathfinder/sast-engine/analytics.PublicKey=${posthogkey}" -v -o pathfinder-linux-arm64 . | |
| chmod +x pathfinder-linux-arm64 | |
| - name: Calculate SHA256 | |
| run: | | |
| cd sast-engine | |
| 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: | | |
| sast-engine/pathfinder-linux-arm64 | |
| sast-engine/pathfinder-linux-arm64.sha256sum.txt | |
| sast-engine/pathfinder-linux-arm64.tar.gz | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.26.1' | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| 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 sast-engine | |
| $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/sast-engine/cmd.Version=${projectVersion} -X github.com/shivasurya/code-pathfinder/sast-engine/cmd.GitCommit=${gitCommit} -X github.com/shivasurya/code-pathfinder/sast-engine/analytics.PublicKey=${posthogkey}" -v -o pathfinder-windows-amd64.exe . | |
| - name: Calculate SHA256 | |
| run: | | |
| cd sast-engine | |
| 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: | | |
| sast-engine/pathfinder-windows-amd64.exe | |
| sast-engine/pathfinder-windows-amd64.exe.sha256sum.txt | |
| sast-engine/pathfinder-windows-amd64.zip | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.26.1' | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| 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 sast-engine | |
| gitCommit=$(git describe --tags) | |
| projectVersion=$(cat VERSION) | |
| posthogkey=$(echo $POSTHOG_WEB_ANALYTICS) | |
| go build -ldflags="-s -w -X github.com/shivasurya/code-pathfinder/sast-engine/cmd.Version=${projectVersion} -X github.com/shivasurya/code-pathfinder/sast-engine/cmd.GitCommit=${gitCommit} -X github.com/shivasurya/code-pathfinder/sast-engine/analytics.PublicKey=${posthogkey}" -v -o pathfinder-darwin-arm64 . | |
| chmod +x pathfinder-darwin-arm64 | |
| - name: Calculate SHA256 | |
| run: | | |
| cd sast-engine | |
| 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: | | |
| sast-engine/pathfinder-darwin-arm64 | |
| sast-engine/pathfinder-darwin-arm64.sha256sum.txt | |
| sast-engine/pathfinder-darwin-arm64.tar.gz | |
| build-macos-intel: | |
| runs-on: macos-15-intel # Intel-based macOS runner (macOS 15) | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.26.1' | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| 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 sast-engine | |
| gitCommit=$(git describe --tags) | |
| projectVersion=$(cat VERSION) | |
| posthogkey=$(echo $POSTHOG_WEB_ANALYTICS) | |
| go build -ldflags="-s -w -X github.com/shivasurya/code-pathfinder/sast-engine/cmd.Version=${projectVersion} -X github.com/shivasurya/code-pathfinder/sast-engine/cmd.GitCommit=${gitCommit} -X github.com/shivasurya/code-pathfinder/sast-engine/analytics.PublicKey=${posthogkey}" -v -o pathfinder-darwin-amd64 . | |
| chmod +x pathfinder-darwin-amd64 | |
| - name: Calculate SHA256 | |
| run: | | |
| cd sast-engine | |
| 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: | | |
| sast-engine/pathfinder-darwin-amd64 | |
| sast-engine/pathfinder-darwin-amd64.sha256sum.txt | |
| sast-engine/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/download-artifact@v4.1.7 | |
| with: | |
| name: pathfinder-linux-amd64 | |
| - name: Download Linux ARM64 Release Asset | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: pathfinder-linux-arm64 | |
| - name: Download Windows Release Asset | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: pathfinder-windows-amd64 | |
| - name: Download macOS ARM64 Release Asset | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: pathfinder-darwin-arm64 | |
| - name: Download macOS Intel Release Asset | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: pathfinder-darwin-amd64 | |
| - name: Create Release and Upload Assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| draft: true | |
| files: | | |
| pathfinder-linux-amd64 | |
| pathfinder-linux-amd64.tar.gz | |
| pathfinder-linux-amd64.sha256sum.txt | |
| pathfinder-linux-arm64 | |
| pathfinder-linux-arm64.tar.gz | |
| pathfinder-linux-arm64.sha256sum.txt | |
| pathfinder-windows-amd64.exe | |
| pathfinder-windows-amd64.zip | |
| pathfinder-windows-amd64.exe.sha256sum.txt | |
| pathfinder-darwin-arm64 | |
| pathfinder-darwin-arm64.tar.gz | |
| pathfinder-darwin-arm64.sha256sum.txt | |
| pathfinder-darwin-amd64 | |
| pathfinder-darwin-amd64.tar.gz | |
| pathfinder-darwin-amd64.sha256sum.txt | |
| fail_on_unmatched_files: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |