Skip to content

Commit

Permalink
clean up formatting for GHA version check
Browse files Browse the repository at this point in the history
  • Loading branch information
hbmartin committed Aug 11, 2024
1 parent 376821a commit d6f8b98
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ jobs:
uses: gradle/actions/setup-gradle@v4
- name: Publish Library
run: |
echo ${{ github.ref }}
GRADLE_REPORTED_VERSION=$(./gradlew printVersion -q)
echo $GRADLE_REPORTED_VERSION
if [ "${{ github.ref }}" != "refs/tags/$GRADLE_REPORTED_VERSION" ]; then
echo "Error: Release tag and gradle version are not equal."
GRADLE_REPORTED_VERSION="refs/tags/$(./gradlew printVersion -q)"
if [ ${{ github.ref }} != $GRADLE_REPORTED_VERSION ]; then
echo "Error: Release tag (${{ github.ref }}) and gradle version ($GRADLE_REPORTED_VERSION) are not equal."
exit 1
fi
./gradlew assemble publishAndReleaseToMavenCentral --no-configuration-cache --no-parallel
Expand Down

0 comments on commit d6f8b98

Please sign in to comment.