[Patch] Releasing maven-unique-feature-branch-action #28 #28
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: Release Workflow | |
run-name: "[${{inputs.release_type}}] Releasing ${{ github.event.repository.name }} #${{github.run_number}}" | |
# Trigger workflow manually | |
on: | |
workflow_dispatch: | |
inputs: | |
release_type: | |
description: 'Release Type' | |
required: true | |
type: choice | |
options: | |
- -- SELECT -- | |
- Major | |
- Minor | |
- Patch | |
default: -- SELECT -- | |
env: | |
BRANCH_NAME: ${{github.ref_name}} | |
TRUNK_BRANCH_NAME: ${{github.event.repository.default_branch}} | |
jobs: | |
release: | |
name: "[${{inputs.release_type}}] Release" | |
runs-on: ubuntu-24.04 | |
if: github.repository_owner == 'ikmdev' | |
steps: | |
- name: Verify Release Type Input | |
if: inputs.release_type == '-- SELECT --' | |
run: | | |
echo "ERROR: Please enter release type" | |
exit 1 | |
- 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: "[${{inputs.release_type}}] Release Shared Action" | |
uses: ikmdev/git-shared-action-release-action@main | |
with: | |
ikmdevops_pat: ${{secrets.IKMDEVOPS_PAT_TOKEN}} | |
github_token: ${{secrets.GITHUB_TOKEN}} | |
release_type: ${{inputs.release_type}} |