13
13
permissions :
14
14
contents : write
15
15
actions : write
16
+ id-token : write
17
+ attestations : write
16
18
steps :
17
19
- uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
18
20
with :
@@ -33,27 +35,29 @@ jobs:
33
35
run : echo "name=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
34
36
- name : Release
35
37
id : release
36
- uses : google-github-actions /release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4.1.1
38
+ uses : googleapis /release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
37
39
with :
38
40
target-branch : ${{ steps.branch.outputs.name }}
39
41
release-type : terraform-module
40
42
token : ${{ steps.token.outputs.token }}
41
43
- name : Attest
42
- if : ${{ steps.release.outputs.releases_created == 'true' }}
43
44
id : attest
44
45
uses : actions/attest-build-provenance@7668571508540a607bdfd90a87a560489fe372eb # v2.1.0
45
46
with :
46
- subject-path : ' ${{ github.workspace }}/lambdas/functions/**/*.zip'
47
+ subject-path : ' ${{ github.workspace }}/**/dist/*.zip'
48
+ - name : ouptut attestation
49
+ run : |
50
+ echo "Attestation bundle: ${{ steps.attest.outputs.bundle-path }}"
51
+ echo "Attestation id: ${{ steps.attest.outputs.attestation-id }}"
52
+ echo "Attestation url: ${{ steps.attest.outputs.attestation-url }}"
47
53
- name : Update release notes with attestation
48
- if : ${{ steps.release.outputs.releases_created == 'true' }}
49
- env :
50
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54
+ if : github.event_name == 'workflow_dispatch'
51
55
run : |
52
- gh release view ${{ steps.release.outputs.tag_name }} --json body -q '.body' > new-release-notes.md
56
+ gh release view ${{ github.event.inputs.version }} --json body -q '.body' > new-release-notes.md
53
57
echo "## Attestation" >> new-release-notes.md
54
58
echo "Attestation url: ${{ steps.attest.outputs.attestation-url }}" >> new-release-notes.md
55
59
echo "You can verify the artifacts by running \`gh attest verify <name of artifact> --repo npalm/atterstation-test\`" >> new-release-notes.md
56
- gh release edit ${{ steps.release.outputs.tag_name }} -F new-release-notes.md -t ${{ steps.release.outputs.tag_name }}
60
+ gh release edit ${{ github.event.inputs.version }} -F new-release-notes.md -t ${{ github.event.inputs.version }}
57
61
- name : Upload Release Assets
58
62
if : ${{ steps.release.outputs.releases_created == 'true' }}
59
63
env :
0 commit comments