Skip to content

Commit 0a05cbd

Browse files
committed
.github/workflows/release: sign zip before sending pull request
The bazel attestations require a separate step. Change-Id: I28e05de4ca3391fd9c87189ff3be3aeedea95ac4
1 parent 0f6c07e commit 0a05cbd

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.github/workflows/release-bazel.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,26 @@ on:
1616
BCR_PUBLISH_TOKEN:
1717
description: 'Token for pushing to re2-machine/bazel-central-registry'
1818
required: true
19+
permissions:
20+
contents: write
21+
id-token: write
22+
attestations: write
1923
jobs:
20-
release:
24+
sign:
25+
uses: bazel-contrib/.github/.github/workflows/[email protected]
26+
with:
27+
release_files: re2*.zip
28+
prerelease: false
29+
tag_name: ${{ inputs.tag_name || github.ref_name }}
30+
send-pull-request:
31+
needs: sign
2132
uses: bazel-contrib/publish-to-bcr/.github/workflows/[email protected]
2233
with:
2334
tag_name: ${{ inputs.tag_name }}
2435
# This workflow seems to require keeping a fork of the upstream to open
2536
# PRs from.
2637
registry_fork: re2-machine/bazel-central-registry
2738
attest: true
28-
permissions:
29-
contents: write
30-
id-token: write
31-
attestations: write
3239
secrets:
3340
# Necessary to push to the BCR fork, and to open a pull request against a registry
3441
publish_token: ${{ secrets.BCR_PUBLISH_TOKEN }}

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
# N.B. This is a whitespace-separated string!
3434
inputs: '*.tar.gz *.zip'
3535
- run: |
36+
cp "re2-${GITHUB_REF_NAME}.zip.sigstore.json" \
37+
"re2-${GITHUB_REF_NAME}.zip.intoto.jsonl"; \
3638
gh release upload "${GITHUB_REF_NAME}" \
3739
*.tar.gz *.zip *.sigstore* \
3840
--repo "${GITHUB_REPOSITORY}"

0 commit comments

Comments
 (0)