Attempt to fix automatic tagging workflow

This commit is contained in:
2025-05-28 16:24:31 +01:00
parent bc2392a2b5
commit f609a5003a

View File

@@ -17,17 +17,17 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Extract Version from Cargo.toml - name: Get package version
id: get_version id: info
uses: sravinet/[email protected] uses: rabbitson87/get-cargo-package-info@v1
with: with:
file: "Cargo.toml" package: |
field: "package.version" version
- name: Check if Tag Exists - name: Check if Tag Exists
id: check_tag id: check_tag
run: | run: |
VERSION=v${{ steps.get_version.outputs.value }} VERSION=${{ fromJson(steps.info.outputs.object).package.version }}
if git rev-parse "$VERSION" >/dev/null 2>&1; then if git rev-parse "$VERSION" >/dev/null 2>&1; then
echo "TAG_EXISTS=true" >> $GITHUB_ENV echo "TAG_EXISTS=true" >> $GITHUB_ENV
else else
@@ -37,7 +37,7 @@ jobs:
- name: Create and Push Git Tag - name: Create and Push Git Tag
if: env.TAG_EXISTS == 'false' if: env.TAG_EXISTS == 'false'
run: | run: |
VERSION=v${{ steps.get_version.outputs.value }} VERSION=${{ fromJson(steps.info.outputs.object).package.version }}
git config --global user.name "github-actions[bot]" git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.email "github-actions[bot]@users.noreply.github.com"
git tag "$VERSION" git tag "$VERSION"