File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2020 workflow_dispatch :
2121 inputs :
2222 tag :
23- description : " Version to publish without v prefix (e.g. 2 .0.0). Must match an existing git tag ."
23+ description : " Full git tag to publish (e.g. v2 .0.0 for new releases, 1.1.3 for old ). Must exist in the repo ."
2424 required : true
2525
2626# Default: deny everything. Each job below grants only what it needs.
@@ -42,17 +42,17 @@ jobs:
4242 steps :
4343 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4444 with :
45- ref : ${{ github.event_name == 'workflow_dispatch' && format('v{0}', inputs.tag) || github.ref }}
45+ ref : ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref }}
4646
4747 - name : 🏷️ Resolve version
4848 id : version
4949 run : |
5050 if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
51- CLEAN="${{ inputs.tag }}" # user provides without v prefix
51+ CLEAN="${{ inputs.tag }}" # full tag as provided (e.g. 1.1.3 or v2.0.0)
5252 else
5353 CLEAN="${{ github.ref_name }}" # e.g. v2.0.0
54- CLEAN="${CLEAN#v}" # strip leading v → 2.0.0
5554 fi
55+ CLEAN="${CLEAN#v}" # strip leading v if present → 2.0.0 or 1.1.3
5656 echo "clean=$CLEAN" >> "$GITHUB_OUTPUT"
5757
5858 # ── Job 2: Build → test → push ─────────────────────────────────────────────
You can’t perform that action at this time.
0 commit comments