File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,12 +30,17 @@ jobs:
3030 # The reusable workflow requires 'write' access to contents to push a git tag.
3131 permissions :
3232 contents : write
33+ # Permissions fro publishing to bcr.
34+ id-token : write
35+ attestations : write
3336
3437 # Pass the inputs from the manual trigger to the reusable workflow.
3538 with :
3639 version : ${{ github.event.inputs.version }}
3740 publish_to_sonatype : false
3841 create_tag : true
42+ publish_to_bcr : true
3943
4044 # Allow the reusable workflow to access the secrets.
4145 secrets : inherit
46+
Original file line number Diff line number Diff line change 3434 description : ' Create a git tag'
3535 type : boolean
3636 required : true
37+ publish_to_bcr :
38+ description : ' Publish the repo to BCR'
39+ type : boolean
40+ required : false
41+ default : false
3742 secrets :
3843 SONATYPE_USERNAME_TOKEN :
3944 description : ' Sonatype username token'
@@ -117,3 +122,25 @@ jobs:
117122 git config --local user.name "J2CL GitHub Bot"
118123 git tag -a "${{ inputs.version }}" -m "Release ${{ inputs.version }}"
119124 git push origin "${{ inputs.version }}"
125+
126+ publish_to_bcr :
127+ runs-on : ubuntu-latest
128+ if : ${{ inputs.create_tag }} && ${{ inputs.publish_to_bcr }}
129+ needs :
130+ - create_git_tag
131+
132+ uses : bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@[version]
133+ with :
134+ tag_name : ${{ inputs.version }}
135+ registry_fork : j2cl-github-bot/bazel-central-registry
136+ attest : true
137+ draft : true
138+ author_name : j2cl-github-bot
139+ author_email : j2cl-github-bot@google.com
140+ permissions :
141+ contents : write
142+ id-token : write
143+ attestations : write
144+ secrets :
145+ publish_token : ${{ secrets.BCR_PUBLISH_TOKEN }}
146+
You can’t perform that action at this time.
0 commit comments