Skip to content

Commit

Permalink
Update release_commit.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonButov authored Mar 4, 2025
1 parent c9b84bb commit f7b09a2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/release_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- trunk
paths:
- "code-factory-processor/build.gradle.kts"

jobs:
release:
Expand All @@ -17,10 +19,17 @@ jobs:
id: get_version
run: echo "VERSION=$(sed -nE 's/^version = \"([^\"]+)\"/\1/p' code-factory-processor/build.gradle.kts)" >> $GITHUB_ENV

- name: Check if tag already exists
run: |
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
echo "Tag v$VERSION already exists. Skipping release."
exit 0
fi
- name: Create Git tag
run: |
git tag "v$VERSION"
git push origin "v$VERSION"
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/AntonButov/code-factory.git "v$VERSION"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
Expand Down

0 comments on commit f7b09a2

Please sign in to comment.