diff options
author | Dan Callahan <d.callahan@f5.com> | 2024-06-21 00:04:54 +0100 |
---|---|---|
committer | Dan Callahan <dan.callahan@gmail.com> | 2024-09-09 15:37:39 +0100 |
commit | 5c58f9d0a0afd4eb1e043abf5f4a20ad4eb3b4cb (patch) | |
tree | 75e745dfe5767fb4bd2cd68fdac585f3a8819134 | |
parent | 27d3a5c7c0d9b9fc03b69871aea6b3c9ab16aaa0 (diff) | |
download | unit-5c58f9d0a0afd4eb1e043abf5f4a20ad4eb3b4cb.tar.gz unit-5c58f9d0a0afd4eb1e043abf5f4a20ad4eb3b4cb.tar.bz2 |
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: 3501a50ffb93756e145295021ff9313ac77f1ba9
-rw-r--r-- | .github/workflows/unitctl.yml | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/.github/workflows/unitctl.yml b/.github/workflows/unitctl.yml index e8e5adf8..7664ab0b 100644 --- a/.github/workflows/unitctl.yml +++ b/.github/workflows/unitctl.yml @@ -186,10 +186,8 @@ jobs: uses: ncipollo/release-action@v1 with: artifacts: "unitctl-*" - # false if triggered by a tag - prerelease: ${{github.event_name == 'workflow_dispatch' && true}} - tag: ${{(github.event_name == 'workflow_dispatch' && inputs.version) || github.ref_name}} - name: unitctl/${{(github.event_name=='workflow_dispatch' && inputs.version) || github.ref_name}} + prerelease: ${{ github.event_name == 'workflow_dispatch' }} + tag: ${{ inputs.version && format('unitctl/{0}', inputs.version) || github.ref_name }} body: > ## Unitctl |