@@ -13,37 +13,64 @@ jobs:
1313 permissions :
1414 contents : write
1515 actions : write
16+ id-token : write
17+ attestations : write
1618 steps :
17- - uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
19+ - uses : actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
1820 with :
19- node-version : 20
20- - uses : actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # ratchet:actions/checkout@v4
21+ node-version : 22
22+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+ with :
24+ persist-credentials : false
2125 - name : Build dist
2226 working-directory : lambdas
2327 run : yarn install --frozen-lockfile && yarn run test && yarn dist
2428 - name : Get installation token
25- uses :
philips-software/ app-token-action@9f5d57062c9f2beaffafaa9a34f66f824ead63a9 # ratchet:philips-software/[email protected] 29+ uses : actions/create-github- app-token@136412a57a7081aa63c935a2cc2918f76c34f514 # v1.11.2
2630 id : token
2731 with :
28- app_id : ${{ secrets.FOREST_RELEASER_APP_ID }}
29- app_base64_private_key : ${{ secrets.FOREST_RELEASER_APP_PRIVATE_KEY_BASE64 }}
30- auth_type : installation
32+ app-id : ${{ vars.RELEASER_APP_ID }}
33+ private-key : ${{ secrets.RELEASER_APP_PRIVATE_KEY }}
3134 - name : Extract branch name
3235 id : branch
3336 shell : bash
3437 run : echo "name=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
3538 - name : Release
3639 id : release
37- uses : google-github-actions /release-please-action@a37ac6e4f6449ce8b3f7607e4d97d0146028dc0b # ratchet:google-github-actions/release-please-action@v3
40+ uses : googleapis /release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
3841 with :
39- default -branch : ${{ steps.branch.outputs.name }}
42+ target -branch : ${{ steps.branch.outputs.name }}
4043 release-type : terraform-module
4144 token : ${{ steps.token.outputs.token }}
42- - name : Upload Release Asset
45+ - name : Attest
46+ if : ${{ steps.release.outputs.releases_created == 'true' }}
47+ id : attest
48+ uses : actions/attest-build-provenance@520d128f165991a6c774bcb264f323e3d70747f4 # v2.2.0
49+ with :
50+ subject-path : ' ${{ github.workspace }}/lambdas/functions/**/*.zip'
51+ - name : Update release notes with attestation
52+ if : ${{ steps.release.outputs.releases_created == 'true' }}
53+ env :
54+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55+ VERSION : ${{ github.event.inputs.version }}
56+ TAG_NAME : ${{ steps.release.outputs.tag_name }}
57+ ATTESTATION_URL : ${{ steps.attest.outputs.attestation-url }}
58+ run : |
59+ version="${VERSION}"
60+ tag_name="${TAG_NAME}"
61+ attestation_url="${ATTESTATION_URL}"
62+ gh release view $version --json body -q '.body' > new-release-notes.md
63+ echo "## Attestation" >> new-release-notes.md
64+ echo "Attestation url: $attestation_url" >> new-release-notes.md
65+ echo "Verify the artifacts by running \`gh attest verify <name_of_artifact> --repo ${{ github.repository }}\`" >> new-release-notes.md
66+ gh release edit $tag_name -F new-release-notes.md -t $tag_name
67+ - name : Upload release assets
4368 if : ${{ steps.release.outputs.releases_created == 'true' }}
4469 env :
4570 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
71+ TAG_NAME : ${{ steps.release.outputs.tag_name }}
4672 run : |
73+ tag_name="${TAG_NAME}"
4774 for f in $(find . -name '*.zip'); do
48- gh release upload ${{ steps.release.outputs. tag_name }} $f
75+ gh release upload $tag_name $f
4976 done
0 commit comments