Merge pull request #6 from GeEom/no_panic #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |