12
12
pull_request :
13
13
branches :
14
14
- ' master'
15
+ permissions :
16
+ contents : read
15
17
jobs :
16
18
release :
17
19
runs-on : macos-12
20
+ # The maximum access is "read" for PRs from public forked repos
21
+ # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
22
+ permissions :
23
+ contents : write # for releases
24
+ id-token : write # for provenances
25
+ attestations : write # for provenances
18
26
timeout-minutes : 20
19
27
steps :
20
28
- uses : actions/checkout@v4
@@ -41,14 +49,27 @@ jobs:
41
49
- name : " Prepare the release note"
42
50
run : |
43
51
shasha=$(shasum -a 256 _artifacts/SHA256SUMS | awk '{print $1}')
52
+ version="VERSION"
53
+ [[ $GITHUB_REF == refs/tags/v* ]] && version="${GITHUB_REF#refs/tags/v}"
44
54
cat <<-EOF | tee /tmp/release-note.txt
45
55
(Changes to be documented)
46
56
- - -
47
57
The binaries were built automatically on GitHub Actions.
48
58
The build log is available for 90 days: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
49
59
50
60
The sha256sum of the SHA256SUMS file itself is \`${shasha}\` .
61
+
62
+ The [GitHub Artifact Attestations](https://cli.github.com/manual/gh_attestation_verify)
63
+ can be verified by running:
64
+ \`\`\`
65
+ gh attestation verify socket_vmnet-${version}-arm64.tar.gz --owner lima-vm
66
+ gh attestation verify socket_vmnet-${version}-x86_64.tar.gz --owner lima-vm
67
+ \`\`\`
51
68
EOF
69
+ - uses : actions/attest-build-provenance@v1
70
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
71
+ with :
72
+ subject-path : _artifacts/*
52
73
- name : " Create release"
53
74
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
54
75
env :
0 commit comments