File tree Expand file tree Collapse file tree 1 file changed +59
-0
lines changed
Expand file tree Collapse file tree 1 file changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ name : ' integrate'
2+ on :
3+ # TODO: Remove pull_request below after testing is done.
4+ pull_request :
5+ workflow_dispatch :
6+ push :
7+ branches :
8+ - ' master'
9+
10+ jobs :
11+ goreleaser :
12+ runs-on : ' ubuntu-latest'
13+ permissions :
14+ contents : ' write' # Needs write access for upload-artifact.
15+ outputs :
16+ hashes : ' ${{ steps.outputs.outputs.hashes }}'
17+ steps :
18+ - name : ' checkout'
19+ uses : ' actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5
20+ with :
21+ fetch-depth : 0 # So that goreleaser can determine the base version.
22+ - name : ' build'
23+ id : ' goreleaser'
24+ uses : ' goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a' # ratchet:goreleaser/goreleaser-action@v6
25+ with :
26+ args : ' release --snapshot --clean --skip docker --skip publish'
27+ version : ' ~> v1'
28+ - name : ' get version'
29+ id : ' version'
30+ shell : ' bash'
31+ run : |
32+ echo "version=$(jq -r .version dist/metadata.json)" >> "$GITHUB_OUTPUT"
33+ - name : ' upload'
34+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # ratchet:actions/upload-artifact@v4
35+ with :
36+ name : ' conftest_${{ steps.version.outputs.version }}'
37+ path : ' dist/*.*'
38+ retention-days : 30
39+ - name : ' generate outputs'
40+ id : ' outputs'
41+ env :
42+ GORELEASER_ARTIFACTS : ' ${{ steps.goreleaser.outputs.artifacts }}'
43+ shell : ' bash'
44+ run : |
45+ set -euo pipefail
46+
47+ checksum_file=$(echo "${GORELEASER_ARTIFACTS}" | jq -r '.[] | select (.type == "Checksum") | .path' | tr -d '\n')
48+ echo "hashes=$(cat ${checksum_file} | base64 -w0)" >> "$GITHUB_OUTPUT"
49+
50+ provenance :
51+ needs : ['goreleaser']
52+ permissions :
53+ contents : ' write' # Needs write access for upload-artifact even when upload-assets is false.
54+ actions : ' read' # To read the workflow path.
55+ id-token : ' write' # To sign the provenance.
56+ uses :
slsa-framework/slsa-github-generator/.github/workflows/[email protected] # ratchet:exclude 57+ with :
58+ base64-subjects : ' ${{ needs.goreleaser.outputs.hashes }}'
59+ upload-assets : false
You can’t perform that action at this time.
0 commit comments