Merge pull request #935 from cpanato/fix #17
Workflow file for this run
This file contains 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*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
env: | |
GOPATH: ${{ github.workspace }} | |
COSIGN_YES: "true" | |
steps: | |
- name: Check out code onto GOPATH | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
fetch-depth: 1 | |
path: ./src/github.com/${{ github.repository }} | |
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version: '1.22' | |
check-latest: true | |
- name: Install ko | |
uses: ko-build/setup-ko@ace48d793556083a76f1e3e6068850c1f4a369aa # v0.6 | |
- name: Install cosign | |
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0 | |
- name: Install bom | |
uses: kubernetes-sigs/release-actions/setup-bom@841d76a188a7c121231a863572e27012805715a2 # v0.1.4 | |
- name: Install GoReleaser | |
uses: goreleaser/goreleaser-action@7ec5c2b0c6cdda6e8bbb49444bc797dd33d74dd8 # v5.0.0 | |
with: | |
install-only: true | |
- name: Get TAG | |
id: get_tag | |
run: echo "TAG=${GITHUB_REF#refs/*/}" >> "$GITHUB_OUTPUT" | |
- name: Run goreleaser | |
working-directory: ./src/github.com/${{ github.repository }} | |
run: make goreleaser | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
attestation: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
needs: | |
- release | |
steps: | |
- name: Check out code onto GOPATH | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
fetch-depth: 1 | |
- name: Set tag output | |
id: tag | |
run: echo "tag_name=${GITHUB_REF#refs/*/}" >> "$GITHUB_OUTPUT" | |
- name: Install tejolote | |
uses: kubernetes-sigs/release-actions/setup-tejolote@841d76a188a7c121231a863572e27012805715a2 # v0.1.4 | |
- run: | | |
tejolote attest --artifacts github://kubernetes-sigs/zeitgeist/${{ steps.tag.outputs.tag_name }} github://kubernetes-sigs/zeitgeist/"${GITHUB_RUN_ID}" --output zeitgeist.intoto.json --sign | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release | |
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v0.1.15 | |
with: | |
files: zeitgeist.intoto.json | |
tag_name: "${{ steps.tag.outputs.tag_name }}" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
env: | |
GITHUB_REPOSITORY: kubernetes-sigs/zeitgeist |