Skip to content

Release 1.3.0

Release 1.3.0 #5

name: Move Major Version Tag on Release
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
release_tag:
required: true
type: string
jobs:
move_major_version_tag:
runs-on: ubuntu-22.04
steps:
# Checks out the code from your repository with all history for all
# branches and tags. This is important if the workflow is launched via
# workspace_dispatch event. It ensures that we can find the release tag
# and the major version tag.
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
# Fetch all history for all branches and tags
fetch-depth: 0
# Configures the git user config. This is necessary when making changes
# to a git repository.
- uses: cgrindel/gha_configure_git_user@v1
# The release tag can come into the workflow via the release event or as
# a workflow_dispatch event. This step finds the first non-empty value
# and outputs it as `selected_value`.
- name: Resolve release_tag
id: resolve_release_tag
uses: cgrindel/gha_select_value@v1
with:
value0: ${{ github.event.release.tag_name }}
value1: ${{ github.event.inputs.release_tag }}
# Create or move the major version tag
- uses: cgrindel/gha_move_major_version_tag@v1
with:
release_tag: ${{ steps.resolve_release_tag.outputs.selected_value }}