Skip to content

chore: release 0.1.7 #5

chore: release 0.1.7

chore: release 0.1.7 #5

Workflow file for this run

name: Create Release
on:
pull_request:
types: [closed]
permissions:
contents: write
jobs:
create-tag:
runs-on: ubuntu-latest
if: "${{ github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'autorelease: pending') }}"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract version from PR title
id: version
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
VERSION=$(echo "$PR_TITLE" | grep -oP 'v\d+\.\d+\.\d+' || echo "")
if [[ -z "$VERSION" ]]; then
echo "No version found in PR title"
exit 1
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create and push tag
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "$VERSION" -m "Release $VERSION"
git push origin "$VERSION"