mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-05-05 22:01:13 +08:00
Fix publish workflow
This commit is contained in:
parent
694fa6bf5c
commit
ba6716c6e1
33
.github/workflows/publish.yaml
vendored
33
.github/workflows/publish.yaml
vendored
@ -1,22 +1,41 @@
|
|||||||
name: "Publish to Bazel Central Registry"
|
name: "Publish to Bazel Central Registry"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# On manual trigger:
|
# Manual kick-off (you type the tag)
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
tag_name:
|
tag_name:
|
||||||
|
description: "Tag to publish"
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
# Fire as soon as the Release workflow completes
|
||||||
|
workflow_run:
|
||||||
|
workflows:
|
||||||
|
- Release
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
|
||||||
|
attestations: write
|
||||||
|
contents: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v0.0.4
|
uses: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml@v0.0.4
|
||||||
|
# Only run on manual dispatch, or when Release finishes successfully
|
||||||
|
if: |
|
||||||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
|
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ inputs.tag_name }}
|
# If manual: use the input, otherwise grab the tag from the completed run
|
||||||
|
tag_name: ${{
|
||||||
|
github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name ||
|
||||||
|
github.event_name == 'workflow_run' && github.event.workflow_run.head_branch
|
||||||
|
}}
|
||||||
registry_fork: ArthurSonzogni/bazel-central-registry
|
registry_fork: ArthurSonzogni/bazel-central-registry
|
||||||
permissions:
|
|
||||||
attestations: write
|
|
||||||
contents: write
|
|
||||||
id-token: write
|
|
||||||
secrets:
|
secrets:
|
||||||
publish_token: ${{ secrets.PUBLISH_TOKEN }}
|
publish_token: ${{ secrets.PUBLISH_TOKEN }}
|
||||||
|
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@ -13,6 +13,8 @@ permissions:
|
|||||||
# Needed to mint attestations
|
# Needed to mint attestations
|
||||||
id-token: write
|
id-token: write
|
||||||
attestations: write
|
attestations: write
|
||||||
|
# Needed to upload release assets
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
Loading…
Reference in New Issue
Block a user