File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313
1414 outputs :
1515 hashes : ${{ steps.hash.outputs.hashes }}
16- tag_name : ${{ steps.tag .outputs.tag_name }}
16+ tag_name : ${{ steps.get_tag .outputs.tag_name }}
1717
1818 runs-on : ubuntu-latest
1919
9090 base64-subjects : " ${{ needs.release.outputs.hashes }}"
9191 upload-assets : true # upload to a new release
9292 upload-tag-name : " ${{ needs.release.outputs.tag_name }}"
93+ # GoReleaser leaves the release as a draft; keep it that way when
94+ # attaching the provenance, otherwise the upload would target an
95+ # immutable (published) release and fail.
96+ draft-release : " true"
97+
98+ # Publish the draft release only after every asset (GoReleaser artifacts and
99+ # SLSA provenance) has been attached, since a published release is immutable.
100+ publish-release :
101+ needs :
102+ - release
103+ - provenance
104+ runs-on : ubuntu-latest
105+ permissions :
106+ contents : write # To publish the draft release.
107+ steps :
108+ - name : Publish release
109+ env :
110+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
111+ GH_REPO : ${{ github.repository }}
112+ TAG_NAME : ${{ needs.release.outputs.tag_name }}
113+ run : gh release edit "${TAG_NAME}" --draft=false
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ builds:
2828 - arm64
2929 - arm
3030 goarm :
31- - 7
31+ - " 7 "
3232 ldflags : |
3333 -X github.com/prometheus/common/version.Version={{.Version}}
3434 -X github.com/prometheus/common/version.Revision={{.Commit}}
@@ -37,7 +37,8 @@ builds:
3737 -X github.com/prometheus/common/version.BuildDate={{.Date}}
3838
3939archives :
40- - format : binary
40+ - formats :
41+ - binary
4142 allow_different_binary_count : true
4243
4344checksum :
6061 - id : ko-image
6162 main : .
6263 base_image : cgr.dev/chainguard/static
63- repository : ghcr.io/cpanato
64+ repositories :
65+ - ghcr.io/cpanato
6466 platforms :
6567 - all
6668 tags :
@@ -75,5 +77,8 @@ release:
7577 github :
7678 owner : cpanato
7779 name : github_actions_exporter
78- draft : false
80+ # Keep the release as a draft so the pipeline can still add assets to it
81+ # (immutable releases forbid uploading assets once published). The release
82+ # workflow publishes it in its last job.
83+ draft : true
7984 prerelease : allow
You can’t perform that action at this time.
0 commit comments