Skip to content

Merge pull request #255 from smlx/dependabot/go_modules/gomod-b1cfbcc16c #161

Merge pull request #255 from smlx/dependabot/go_modules/gomod-b1cfbcc16c

Merge pull request #255 from smlx/dependabot/go_modules/gomod-b1cfbcc16c #161

Workflow file for this run

name: release
on:
push:
branches:
- main
permissions: {}
jobs:
release-tag:
permissions:
# create tag
contents: write
runs-on: ubuntu-latest
outputs:
new-tag: ${{ steps.ccv.outputs.new-tag }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Bump tag if necessary
id: ccv
uses: smlx/ccv@7318e2f25a52dcd550e75384b84983973251a1f8 # v0.10.0
release-build:
permissions:
# create release
contents: write
# push docker images to registry
packages: write
# required by attest-build-provenance
id-token: write
attestations: write
needs: release-tag
if: needs.release-tag.outputs.new-tag == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version: stable
- uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: anchore/sbom-action/download-syft@a930d0ac434e3182448fe678398ba5713717112a # v0.21.0
- uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
id: goreleaser
with:
version: latest
args: release --verbose
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# attest artifacts
- uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0
with:
subject-checksums: ./dist/checksums.txt
# attest images
- uses: actions/attest-build-provenance@00014ed6ed5efc5b1ab7f7f34a39eb55d41aa4f8 # v3.1.0
with:
subject-checksums: ./dist/digests.txt
push-to-registry: true