Releasing tinkar-composer #6 #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SemVer Release Workflow | |
run-name: "Releasing ${{ github.event.repository.name }} #${{github.run_number}}" | |
# Trigger workflow manually | |
on: | |
workflow_dispatch: | |
inputs: | |
release_version: | |
type: string | |
description: "(Optional) Custom Release Version" | |
required: false | |
version_type: | |
description: 'Development version type to increment' | |
required: true | |
default: 'minor' | |
type: choice | |
options: | |
- major | |
- minor | |
- patch | |
env: | |
BRANCH_NAME: ${{ github.ref_name }} | |
TRUNK_BRANCH_NAME: ${{ github.event.repository.default_branch }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-24.04 | |
if: github.repository_owner == 'ikmdev' | |
steps: | |
- name: Verify Branch | |
if: env.BRANCH_NAME != env.TRUNK_BRANCH_NAME | |
run: | | |
echo "ERROR: Attempting to release from branch ${{ env.BRANCH_NAME }}. Release from ${{ env.TRUNK_BRANCH_NAME }} branch only." | |
exit 1 | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{secrets.IKMDEVOPS_PAT_TOKEN}} | |
- name: Shared Release Action | |
uses: ikmdev/[email protected] | |
with: | |
version_type: ${{ github.event.inputs.version_type }} | |
github_token: ${{secrets.GITHUB_TOKEN}} | |
release_version: ${{ github.event.inputs.release_version }} |