Skip to content

Commit d0bf7ef

Browse files
committed
Finalize release after publish to BCR
1 parent 493b987 commit d0bf7ef

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/publish.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,28 @@ on:
1919
description: a tag pointing to the commit being published
2020
required: true
2121
type: string
22+
23+
permissions:
24+
attestations: write
25+
contents: write
26+
id-token: write
2227
jobs:
2328
publish:
2429
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v1.1.0
2530
with:
2631
tag_name: ${{ inputs.tag_name }}
2732
# GitHub repository which is a fork of the upstream where the Pull Request will be opened.
2833
registry_fork: bazel-contrib/bazel-central-registry
29-
draft: false
30-
permissions:
31-
attestations: write
32-
contents: write
33-
id-token: write
34+
draft: false # The PR can be non-draft since it's opened by bazel-contrib-bot.
3435
secrets:
3536
# Necessary to push to the BCR fork, and to open a pull request against a registry
3637
publish_token: ${{ secrets.publish_token || secrets.BCR_PUBLISH_TOKEN }}
38+
# The publish.yaml re-usable workflow mutates the release, so it has been a draft until now.
39+
# This job will update the release to be non-draft.
40+
update_release:
41+
needs: publish
42+
runs-on: ubuntu-latest
43+
steps:
44+
- run: gh release edit ${{ inputs.tag_name }} --draft=false
45+
env:
46+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)