Skip to content

Commit 3de810f

Browse files
committed
chore(ci): stage provenance file as part of release PR
1 parent 9ba6732 commit 3de810f

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/pre-release.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ jobs:
235235
# Creates a PR with the latest version we've just released
236236
# since our trunk is protected against any direct pushes from automation
237237
bump_version:
238-
needs: [release, seal]
238+
needs: [release, seal, provenance]
239239
permissions:
240240
contents: write # create-pr action creates a temporary branch
241241
pull-requests: write # create-pr action creates a PR using the temporary branch
@@ -252,12 +252,24 @@ jobs:
252252
integrity_hash: ${{ needs.seal.outputs.integrity_hash }}
253253
artifact_name: ${{ needs.seal.outputs.artifact_name }}
254254

255+
- name: Download provenance
256+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
257+
with:
258+
provenance_name: ${{needs.provenance.outputs.provenance-name}}
259+
260+
- name: Update provenances
261+
run: mkdir -p "${PROVENANCE_DIR}" && mv "${PROVENANCE_FILE}" "${PROVENANCE_DIR}/"
262+
env:
263+
PROVENANCE_FILE: ${{ needs.provenance.outputs.provenance-name }}
264+
PROVENANCE_DIR: provenances/${{ needs.seal.outputs.RELEASE_VERSION}}
265+
255266
- name: Create PR
256267
id: create-pr
257268
uses: ./.github/actions/create-pr
258269
with:
259-
files: "pyproject.toml aws_lambda_powertools/shared/version.py"
270+
files: "pyproject.toml aws_lambda_powertools/shared/version.py $PROVENANCE_FILE"
260271
temp_branch_prefix: "ci-bump"
261-
pull_request_title: "chore(ci): new pre-release ${{ needs.seal.outputs.RELEASE_VERSION
262-
}}"
272+
pull_request_title: "chore(ci): new pre-release ${{ needs.seal.outputs.RELEASE_VERSION }}"
263273
github_token: ${{ secrets.GITHUB_TOKEN }}
274+
env:
275+
PROVENANCE_FILE: provenances/${{needs.seal.outputs.RELEASE_VERSION}}/${{needs.provenance.outputs.provenance-name}}

0 commit comments

Comments
 (0)