File tree Expand file tree Collapse file tree 3 files changed +59
-3
lines changed Expand file tree Collapse file tree 3 files changed +59
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to BCR
2+ on :
3+ # Run the publish workflow after a successful release
4+ # Will be triggered from the release.yaml workflow
5+ workflow_call :
6+ inputs :
7+ tag_name :
8+ required : true
9+ type : string
10+ secrets :
11+ publish_token :
12+ required : true
13+ # In case of problems, let release engineers retry by manually dispatching
14+ # the workflow from the GitHub UI
15+ workflow_dispatch :
16+ inputs :
17+ tag_name :
18+ description : git tag being released
19+ required : true
20+ type : string
21+ jobs :
22+ publish :
23+ uses :
bazel-contrib/publish-to-bcr/.github/workflows/[email protected] 24+ with :
25+ tag_name : ${{ inputs.tag_name }}
26+ # GitHub repository which is a fork of the upstream where the Pull Request will be opened.
27+ registry_fork : bazel-io/bazel-central-registry
28+ draft : false
29+ permissions :
30+ attestations : write
31+ contents : write
32+ id-token : write
33+ secrets :
34+ # Necessary to push to the BCR fork, and to open a pull request against a registry
35+ publish_token : ${{ secrets.publish_token || secrets.BCR_PUBLISH_TOKEN }}
Original file line number Diff line number Diff line change 22name : Release
33
44on :
5+ # Can be triggered from the tag.yaml workflow
6+ workflow_call :
7+ inputs :
8+ tag_name :
9+ required : true
10+ type : string
11+ secrets :
12+ publish_token :
13+ required : true
14+ # Or, developers can manually push a tag from their clone
515 push :
616 tags :
717 # Detect tags that look like a release.
818 # Note that we don't use a "v" prefix to help anchor this pattern.
919 # This is purely a matter of preference.
1020 - " *.*.*"
11-
21+ permissions :
22+ id-token : write
23+ attestations : write
24+ contents : write
1225jobs :
1326 release :
1427 # Re-use https://github.com/bazel-contrib/.github/blob/v7/.github/workflows/release_ruleset.yaml
1528 uses : bazel-contrib/.github/.github/workflows/release_ruleset.yaml@v7
1629 with :
1730 prerelease : false
18- release_files : rules_cc-*.tar.gz
31+ release_files : rules_cc-*.tar.gz
32+ tag_name : ${{ inputs.tag_name || github.ref_name }}
33+ publish :
34+ needs : release
35+ uses : ./.github/workflows/publish.yaml
36+ with :
37+ tag_name : ${{ inputs.tag_name || github.ref_name }}
38+ secrets :
39+ publish_token : ${{ secrets.publish_token || secrets.BCR_PUBLISH_TOKEN }}
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ set -o errexit -o nounset -o pipefail
44
55# Set by GH actions, see
66# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
7- readonly TAG=${GITHUB_REF_NAME}
7+ readonly TAG=$1
88# The prefix is chosen to match what GitHub generates for source archives.
99# This guarantees that users can easily switch from a released artifact to a source archive
1010# with minimal differences in their code (e.g. strip_prefix remains the same)
You can’t perform that action at this time.
0 commit comments