Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpeapsUnterstrichHD committed Sep 3, 2024
1 parent a6577a6 commit 747adbe
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/rust-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ jobs:
version=$(grep '^version = ' Cargo.toml | sed 's/version = "\(.*\)"/\1/')
echo "version=$version" >> $GITHUB_ENV
- name: Delete existing tag if it exists
run: |
tag="v${{ env.version }}"
if git rev-parse "$tag" >/dev/null 2>&1; then
echo "Tag $tag exists, deleting..."
git tag -d "$tag"
git push --delete origin "$tag"
else
echo "Tag $tag does not exist, no need to delete."
fi
- name: Create GitHub Release
id: create_release
env:
Expand All @@ -26,4 +37,6 @@ jobs:
tag="v${{ env.version }}"
title="v${{ env.version }}"
description="created on $(date +%Y-%m-%d)"
git tag "$tag"
git push origin "$tag"
gh release create "$tag" --title "$title" --notes "$description"

0 comments on commit 747adbe

Please sign in to comment.