Skip to content

chore: bump version to 0.19.0 #26

chore: bump version to 0.19.0

chore: bump version to 0.19.0 #26

Workflow file for this run

name: Auto-Tag on Version Bump
on:
push:
branches: [mainline]
paths: [Directory.Build.props]
permissions:
contents: write
actions: write
jobs:
tag:
name: Create version tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Extract version
id: version
run: |
version=$(grep -oP '(?<=<SharpyVersion>)[^<]+' Directory.Build.props)
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "tag=v$version" >> "$GITHUB_OUTPUT"
- name: Check if tag exists
id: check
run: |
if git rev-parse "refs/tags/${{ steps.version.outputs.tag }}" >/dev/null 2>&1; then
echo "exists=true" >> "$GITHUB_OUTPUT"
else
echo "exists=false" >> "$GITHUB_OUTPUT"
fi
- name: Create and push tag
if: steps.check.outputs.exists == 'false'
run: |
git tag "${{ steps.version.outputs.tag }}"
git push origin "${{ steps.version.outputs.tag }}"
- name: Trigger release workflow
if: steps.check.outputs.exists == 'false'
env:
GH_TOKEN: ${{ github.token }}
run: gh workflow run release.yml -f tag="${{ steps.version.outputs.tag }}"