feat: Improve output quality and documentation #5
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
| # Release workflow using GoReleaser | |
| # Triggered on version tags (v*) | |
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| packages: write | |
| id-token: write # For cosign signing | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.22' | |
| cache: true | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Cosign | |
| uses: sigstore/cosign-installer@v3 | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| distribution: goreleaser | |
| version: '~> v2' | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| - name: Upload release artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-artifacts | |
| path: dist/* | |
| retention-days: 5 | |
| # Verify the release works | |
| verify: | |
| name: Verify Release | |
| needs: release | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Download and verify (Linux/macOS) | |
| if: runner.os != 'Windows' | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/} | |
| if [[ "$RUNNER_OS" == "Linux" ]]; then | |
| ARCH="x86_64" | |
| OS="Linux" | |
| else | |
| ARCH="x86_64" | |
| OS="Darwin" | |
| fi | |
| echo "Downloading cryptodeps ${VERSION} for ${OS}_${ARCH}..." | |
| curl -sLO "https://github.com/csnp/qramm-cryptodeps/releases/download/${VERSION}/cryptodeps_${VERSION#v}_${OS}_${ARCH}.tar.gz" | |
| tar xzf cryptodeps_*.tar.gz | |
| ./cryptodeps version | |
| ./cryptodeps status | |
| - name: Download and verify (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $VERSION = "${{ github.ref_name }}" | |
| $URL = "https://github.com/csnp/qramm-cryptodeps/releases/download/${VERSION}/cryptodeps_$($VERSION.TrimStart('v'))_Windows_x86_64.zip" | |
| Write-Host "Downloading from $URL..." | |
| Invoke-WebRequest -Uri $URL -OutFile cryptodeps.zip | |
| Expand-Archive -Path cryptodeps.zip -DestinationPath . | |
| .\cryptodeps.exe version | |
| .\cryptodeps.exe status |