Skip to content

Create tagged release from GitHub UI #25

Description

@sgoudham

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 include on_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' }}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions