docs: update CHANGELOG for v1.3.0 #32
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: read | |
| jobs: | |
| test: | |
| name: Test & Coverage | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.24" | |
| cache: true | |
| - name: Install gotestsum | |
| run: go install gotest.tools/gotestsum@v1.13.0 | |
| - name: Run tests with coverage | |
| shell: bash | |
| run: | | |
| gotestsum --format testdox -- $(go list ./... | grep -v -e '/testutil$' -e '/test$') -race -coverprofile=coverage.out -covermode=atomic | |
| - name: Coverage summary | |
| shell: bash | |
| run: | | |
| go tool cover -func=coverage.out | tee coverage.txt | |
| total=$(go tool cover -func=coverage.out | awk '/total:/ {print $3}') | |
| echo "Total coverage: ${total}" | |
| lint: | |
| uses: ./.github/workflows/reusable-lint.yml | |
| goreleaser: | |
| needs: [test, lint] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| id-token: write | |
| outputs: | |
| hashes: ${{ steps.hash.outputs.hashes }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetch all tags | |
| run: git fetch --force --tags | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.24" | |
| cache: true | |
| - name: Install Syft | |
| uses: anchore/sbom-action/download-syft@v0.23.0 | |
| - name: Install cosign | |
| uses: sigstore/cosign-installer@v3 | |
| with: | |
| cosign-release: "v2.2.2" | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v7 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COSIGN_YES: "true" | |
| COSIGN_EXPERIMENTAL: "1" | |
| - name: Generate artifact hashes for SLSA | |
| id: hash | |
| run: | | |
| cd dist | |
| # List files for debugging | |
| echo "Files in dist:" | |
| ls -la | |
| # Generate hashes only for the binary archives (not checksums or SBOMs) | |
| echo "Generating hashes..." | |
| sha256sum armis-cli-*.tar.gz armis-cli-*.zip > hashes-raw.txt 2>&1 || true | |
| cat hashes-raw.txt | |
| # Base64 encode the hashes | |
| if [ -s hashes-raw.txt ]; then | |
| base64 -w0 < hashes-raw.txt > hashes.txt | |
| echo "Base64 encoded hashes:" | |
| cat hashes.txt | |
| echo "hashes=$(cat hashes.txt)" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "ERROR: No hashes generated!" | |
| exit 1 | |
| fi | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: release-artifacts | |
| path: | | |
| dist/*.tar.gz | |
| dist/*.zip | |
| dist/*checksums.txt | |
| dist/*.sbom.cdx.json | |
| retention-days: 7 | |
| provenance: | |
| needs: [test, lint, goreleaser] | |
| permissions: | |
| actions: read | |
| id-token: write | |
| contents: write | |
| uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0 | |
| with: | |
| base64-subjects: "${{ needs.goreleaser.outputs.hashes }}" | |
| upload-assets: true | |
| private-repository: true |