Skip to content

release: 0.0.36

release: 0.0.36 #4

Workflow file for this run

name: Auto Tag
on: [push]
permissions:
contents: write
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# parse version from git log like `release: 0.0.35`
- name: Get version
id: version
run: echo ::set-output name=version::$(git log --pretty=oneline --grep='release: ' -1 | grep -oP 'release: \K[0-9.]+')

Check failure on line 15 in .github/workflows/autotag.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/autotag.yml

Invalid workflow file

You have an error in your yaml syntax on line 15
# skip if no version found
- name: Check version
run: echo "Version: ${{ steps.version.outputs.version }}"
- name: Skip if no version
if: steps.version.outputs.version == ''
run: echo "No version found, skipping..."
# create & push tag
- name: Create & push tag
if: steps.version.outputs.version != ''
run: |
git tag v${{ steps.version.outputs.version }}
git push origin v${{ steps.version.outputs.version }}