Skip to content

Add for loop type inference support #6

Add for loop type inference support

Add for loop type inference support #6

Workflow file for this run

name: Publish Release Tag on Release PR Merge
on:
pull_request:
types: [closed]
branches: [main]
permissions:
contents: write
jobs:
create-tag:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release-v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Extract version from branch name
id: version
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
run: |
VERSION="${BRANCH#release-}"
if [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid version format: $VERSION"
exit 1
fi
echo "tag=${VERSION}" >> "$GITHUB_OUTPUT"
- name: Create and push tag
env:
TAG: ${{ steps.version.outputs.tag }}
run: |
git tag "$TAG"
git push origin "$TAG"