-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.76 KB
/
Copy pathrelease.yml
File metadata and controls
50 lines (48 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
on:
push:
tags:
- v*
workflow_dispatch:
permissions: {}
jobs:
goreleaser:
runs-on: ubuntu-latest
permissions:
# To upload archives as GitHub Releases
contents: write
# To push Docker images to GitHub
packages: write
# To sign the provenance attestation for the release archives
id-token: write
attestations: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# All history, required for goreleaser
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: false
- # For TagBody, TagSubject or TagContents fields in goreleaser's templates
run: git fetch --force --tags
- # goreleaser shells out to syft for the sboms stanza
uses: anchore/sbom-action/download-syft@3ad7283483fc7af8ff2b4ea19663c2d5ca935e26 # v0.24.2
- uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7
with:
version: v2.15.2
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Every archive listed in the checksums file goreleaser just wrote, so
# `gh attestation verify` can tie a downloaded artifact back to this
# workflow and commit.
- uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-checksums: dist/checksums.txt