Skip to content

Merge pull request #6 from GeEom/no_panic #1

Merge pull request #6 from GeEom/no_panic

Merge pull request #6 from GeEom/no_panic #1

Workflow file for this run

name: Auto-tag
on:
push:
branches: [main]
jobs:
tag:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create tag if new version
run: |
VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
if git ls-remote --tags origin "refs/tags/v$VERSION" | grep -q .; then
echo "Tag v$VERSION already exists, skipping"
else
git tag "v$VERSION"
git push origin "v$VERSION"
fi