Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
release:
types:
- published
workflow_dispatch:
inputs:
ref:
description: Git ref to publish from
required: false
default: main

jobs:
publish:
Expand All @@ -14,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.release.tag_name }}
ref: ${{ github.event.release.tag_name || inputs.ref || github.ref_name }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Honor selected workflow ref before defaulting to main

For workflow_dispatch runs, inputs.ref has a default (main), so this expression resolves to main whenever the input is left as-is, even if the run was started from a tag/branch in the Actions UI. In a publish workflow, that can cause a manual retry intended for a release tag to publish code from main instead. Reorder/fence this fallback so the selected run ref is used unless an explicit override was provided.

Useful? React with 👍 / 👎.

- uses: actions/setup-node@v6
with:
node-version: 24
Expand Down