chore(release): cut v0.20.0 (#150) #54
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 | |
| packages: write | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| cache: true | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v7 | |
| with: | |
| distribution: goreleaser | |
| # Pinned to a known-good version (see #113). Bump deliberately after the | |
| # CI snapshot Build job has exercised the new version, never via `latest`, | |
| # so a GoReleaser change can't break a release after the tag is created. | |
| version: v2.16.0 | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| SCOOP_BUCKET_TOKEN: ${{ secrets.SCOOP_BUCKET_TOKEN }} | |
| - name: Upload release artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: release-artifacts | |
| path: | | |
| dist/*.tar.gz | |
| dist/*.zip | |
| dist/checksums.txt | |
| retention-days: 30 | |
| verify-release: | |
| name: Verify Release | |
| runs-on: ${{ matrix.os }} | |
| needs: release | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Download release artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: release-artifacts | |
| path: ./artifacts | |
| - name: Display artifacts | |
| run: ls -R ./artifacts | |
| shell: bash | |
| - name: Verify checksums (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| cd artifacts | |
| sha256sum -c checksums.txt || echo "Some files missing in artifacts (expected)" | |
| - name: Test binary extraction (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| cd artifacts | |
| # Find the appropriate archive for this platform | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| ARCHIVE=$(ls *linux*.tar.gz | head -1) | |
| elif [ "$RUNNER_OS" == "macOS" ]; then | |
| ARCHIVE=$(ls *darwin*.tar.gz | head -1) | |
| fi | |
| if [ -n "$ARCHIVE" ]; then | |
| tar -xzf "$ARCHIVE" | |
| ./pass-cli version || echo "Binary test completed" | |
| fi | |
| - name: Test binary extraction (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| cd artifacts | |
| $archive = Get-ChildItem -Filter "*windows*.zip" | Select-Object -First 1 | |
| if ($archive) { | |
| Expand-Archive -Path $archive.FullName -DestinationPath . | |
| .\pass-cli.exe version | |
| } |