Skip to content

Commit 240ae7c

Browse files
committed
.github/workflows/release: sign zip before sending pull request
The bazel attestations require a separate step. We will be able to use //:small_tests in future releases, but it does not exist yet in 2025-08-12. Change-Id: I28e05de4ca3391fd9c87189ff3be3aeedea95ac4
1 parent 0f6c07e commit 240ae7c

File tree

4 files changed

+38
-5
lines changed

4 files changed

+38
-5
lines changed

.github/workflows/release-bazel.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,27 @@ 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+
bazel_test_command: 'bazel test //:re2_test'
31+
send-pull-request:
32+
needs: sign
2133
uses: bazel-contrib/publish-to-bcr/.github/workflows/[email protected]
2234
with:
2335
tag_name: ${{ inputs.tag_name }}
2436
# This workflow seems to require keeping a fork of the upstream to open
2537
# PRs from.
2638
registry_fork: re2-machine/bazel-central-registry
2739
attest: true
28-
permissions:
29-
contents: write
30-
id-token: write
31-
attestations: write
3240
secrets:
3341
# Necessary to push to the BCR fork, and to open a pull request against a registry
3442
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}"

.github/workflows/release_prep.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
echo "$@"

BUILD.bazel

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,3 +436,24 @@ cc_binary(
436436
"@google_benchmark//:benchmark_main",
437437
],
438438
)
439+
440+
test_suite(
441+
name = "small_tests",
442+
tags = ["small"],
443+
tests = [
444+
":charclass_test",
445+
":compile_test",
446+
":filtered_re2_test",
447+
":mimics_pcre_test",
448+
":parse_test",
449+
":possible_match_test",
450+
":re2_arg_test",
451+
":re2_test",
452+
":regexp_test",
453+
":required_prefix_test",
454+
":search_test",
455+
":set_test",
456+
":simplify_test",
457+
":string_generator_test",
458+
],
459+
)

0 commit comments

Comments
 (0)