branch name use and extraction fixes, limit validation to main branch

This commit is contained in:
github-actions[bot]
2025-10-27 14:23:05 +11:00
parent 63830beda2
commit 74c8980edc
4 changed files with 17 additions and 4 deletions

View File

@@ -12,6 +12,9 @@ on:
permissions:
contents: write
env:
CURRENT_BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
create-github-release:
name: Create GitHub Release
@@ -24,12 +27,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ github.event.workflow_run.head_branch }}
ref: $CURRENT_BRANCH_NAME
fetch-depth: 0
- name: Extract version from branch
id: extract
run: .github/scripts/extract_version.sh "${{ github.event.workflow_run.head_branch }}"
run: .github/scripts/extract_version.sh "$CURRENT_BRANCH_NAME"
- name: Validate version format
id: validate