Skip to content

Release - Create hotfix branch version v2.1.2 #33

Release - Create hotfix branch version v2.1.2

Release - Create hotfix branch version v2.1.2 #33

name: Release - Create Branch
run-name: Release - Create ${{ inputs.releaseType }} branch version ${{ inputs.versionName }}
on:
workflow_dispatch:
inputs:
gitRef:
description: "Git Ref (e.g. main-456)"
required: true
default: ""
releaseType:
description: "Release type"
type: choice
required: true
options:
- release
- hotfix
versionName:
description: "Version name (must follow e.g. v1.0.0)"
required: true
default: "v0.0.0"
jobs:
createBranch:
name: "Create ${{ inputs.releaseType }} branch"
runs-on: ubuntu-latest
steps:
# Create the branch.
- name: Create branch
uses: actions/checkout@v4
with:
ref: ${{ inputs.gitRef }}
- run: |
git config user.name github-actions
git config user.email [email protected]
git checkout -b "${{ inputs.releaseType }}/${{ inputs.versionName }}"
git push --set-upstream origin "${{ inputs.releaseType }}/${{ inputs.versionName }}"