Skip to content

Commit 5c58f9d

Browse files
committed
ci: Fix tags on ad hoc unitctl releases
- Adds `unitctl/` prefix to tags generated by manual workflow runs. Previously, only release titles (but not tags) were prefixed. - Omits superfluous `name` field; falls back to `tag` when absent. - Removes unnecessary conditional from `prelease` field. This results in the following tagging / releasing behavior: 1. Running manually creates a pre-release and tags it `unitctl/VERSION` 2. Pushing a tag formatted like `x.y.z` creates a normal release Refines: 3501a50
1 parent 27d3a5c commit 5c58f9d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/unitctl.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,8 @@ jobs:
186186
uses: ncipollo/release-action@v1
187187
with:
188188
artifacts: "unitctl-*"
189-
# false if triggered by a tag
190-
prerelease: ${{github.event_name == 'workflow_dispatch' && true}}
191-
tag: ${{(github.event_name == 'workflow_dispatch' && inputs.version) || github.ref_name}}
192-
name: unitctl/${{(github.event_name=='workflow_dispatch' && inputs.version) || github.ref_name}}
189+
prerelease: ${{ github.event_name == 'workflow_dispatch' }}
190+
tag: ${{ inputs.version && format('unitctl/{0}', inputs.version) || github.ref_name }}
193191
body: >
194192
## Unitctl
195193

0 commit comments

Comments
 (0)