Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,36 @@ jobs:
echo "Version from package.json: $VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Check if tag already exists
- name: Fetch tags from origin
run: |
git fetch --tags --prune

- name: Check if tag already exists (remote)
id: check
run: |
TAG="v${{ steps.pkg.outputs.version }}"
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Tag $TAG already exists. Skipping."
echo "Checking for tag $TAG on remote..."
if git ls-remote --tags origin "$TAG" | grep -q "$TAG"; then
echo "Tag $TAG already exists on remote. Skipping."
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
# also check locally as a fallback
if git rev-parse "$TAG" >/dev/null 2>&1; then
echo "Tag $TAG already exists locally. Skipping."
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
fi

- name: Create and push tag
- name: Create and push annotated tag
if: steps.check.outputs.exists == 'false'
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"

TAG="v${{ steps.pkg.outputs.version }}"
git tag "$TAG"
git tag -a "$TAG" -m "Release $TAG"
git push origin "$TAG"

- name: Create GitHub release
Expand All @@ -57,6 +68,6 @@ jobs:
πŸš€ **Automatic Release**

Version: v${{ steps.pkg.outputs.version }}
Triggered by merge into \`prod\`.
Triggered by merge into `prod`.

Commit: ${{ github.sha }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aether-ui",
"version": "0.1.6",
"version": "0.1.7",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
Expand Down