Skip to content

Commit d6f8b98

Browse files
committed
clean up formatting for GHA version check
1 parent 376821a commit d6f8b98

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/publish.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ jobs:
1717
uses: gradle/actions/setup-gradle@v4
1818
- name: Publish Library
1919
run: |
20-
echo ${{ github.ref }}
21-
GRADLE_REPORTED_VERSION=$(./gradlew printVersion -q)
22-
echo $GRADLE_REPORTED_VERSION
23-
if [ "${{ github.ref }}" != "refs/tags/$GRADLE_REPORTED_VERSION" ]; then
24-
echo "Error: Release tag and gradle version are not equal."
20+
GRADLE_REPORTED_VERSION="refs/tags/$(./gradlew printVersion -q)"
21+
if [ ${{ github.ref }} != $GRADLE_REPORTED_VERSION ]; then
22+
echo "Error: Release tag (${{ github.ref }}) and gradle version ($GRADLE_REPORTED_VERSION) are not equal."
2523
exit 1
2624
fi
2725
./gradlew assemble publishAndReleaseToMavenCentral --no-configuration-cache --no-parallel

0 commit comments

Comments
 (0)