Skip to content

Commit

Permalink
chore: fix auto versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmelati committed Jan 15, 2025
1 parent 7d9898d commit 1b00480
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/auto-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- name: Get version info
id: get_version_info
run: |
git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --local user.name "${GITHUB_ACTOR}"
# Handle both PR and push events for branch name
EVENT_NAME="${{ github.event_name }}"
if [[ "$EVENT_NAME" == "pull_request" ]]; then
Expand Down Expand Up @@ -134,11 +137,7 @@ jobs:
echo "new_version=${NEW_VERSION}" >> $GITHUB_OUTPUT
# Configure git
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
# Update version in build.gradle.kts
# Update version in build.gradle.kts
VERSION_WITHOUT_V=${NEW_VERSION#v}
BASE_VERSION=$(echo $VERSION_WITHOUT_V | cut -d'-' -f1)
sed -i "s/version = \".*\"/version = \"$BASE_VERSION\"/" build.gradle.kts
Expand Down

0 comments on commit 1b00480

Please sign in to comment.