Skip to content

Commit 0a6dc58

Browse files
authored
Add snapshot hash
1 parent 62324fd commit 0a6dc58

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/gradle-publish-base.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ jobs:
101101
run: |
102102
VERSION="${{ steps.get_version.outputs.version }}"
103103
if ${{ inputs.release_name == 'latest' }}; then
104-
VERSION="$VERSION-SNAPSHOT"
104+
COMMIT_SHA=$(curl -s "https://api.github.com/repos/google/watchface/git/ref/tags/${{ inputs.release_name }}" | jq -r '.object.sha')
105+
SHORT_COMMIT_SHA=$(git rev-parse --short "$COMMIT_SHA")
106+
VERSION="$VERSION-$SHORT_COMMIT_SHA-SNAPSHOT"
105107
fi
106108
echo "Final version: $VERSION"
107109
echo "::set-output name=final_version::$VERSION"

0 commit comments

Comments
 (0)