-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 2.1 KB
/
Copy pathrelease.yml
File metadata and controls
56 lines (51 loc) · 2.1 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
51
52
53
54
55
56
name: Release
# Tags only: a release is a human decision (see CONTRIBUTING.md). Tags are cut
# from `dev`, the repository's only long-lived branch.
on:
push:
tags: ["v*"]
permissions:
contents: read
# Actions below are pinned by commit SHA: a tag is mutable, and this
# repository's artifacts are attested, so the workflow that produces them
# must be reproducible. Dependabot updates the pins and the trailing comments.
jobs:
release:
name: Build, attest, and draft the release
runs-on: ubuntu-latest
permissions:
contents: write # create the release and upload artifacts
id-token: write # sign the provenance attestation (OIDC)
attestations: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# GoReleaser builds the changelog from history; a shallow clone
# would produce an empty one.
fetch-depth: 0
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
# Release artifacts are built with a current patched toolchain: the
# Go standard library ships inside the binary, so its vulnerabilities
# ship with it.
go-version: stable
# GoReleaser is configured to create a DRAFT release: a bad tag is
# fixable before anyone can download from it.
- name: GoReleaser
uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Signed provenance for every artifact, so a download can be traced back
# to this workflow, repository, and commit:
# gh attestation verify wpus_<version>_<os>_<arch>.tar.gz \
# --repo wpultimatesecurity/ultimate-security-cli
- name: Attest build provenance
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
with:
subject-path: |
dist/*.tar.gz
dist/checksums.txt