uwuifyy
uwuifyy copied to clipboard
Create tagged release from GitHub UI
Motivation
I want to be able to release a new version of the binary solely from GitHub Actions itself instead of having to clone the repository and create/push the tag itself.
Description
The existing deploy.yml should be modified to take in a workflow_dispatch
event. More information can be found here
This workflow_dispatch
event should take in a parameter called tag
which prompts the user to enter a tag name.
Once the above is configured, a conditional job should be created in the same file (before all the other jobs!) which only runs if the workflow was manually triggered (see if condition down below in the acceptance criteria). The job itself should pull down the latest changes of the repository and create a new tag based on the input tag name, override the default github.ref
environment variable with the new tag name and then continue to execute the other steps.
Note You might not be able to override the default
github.ref
environment variable, in that case, please comment down below and we can think of some other workarounds.
An article that describes some of the syntax is listed here which may help you!
Acceptance Criteria
- [ ]
.github/workflows/deploy.yml
has been modified to includeon_workflow_dispatch
and take in tag name as a parameter - [ ] A job is created to create the tag and ran conditionally
if: ${{ $GITHUB_EVENT_NAME == 'workflow_dispatch' }}