We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62324fd commit 0a6dc58Copy full SHA for 0a6dc58
.github/workflows/gradle-publish-base.yml
@@ -101,7 +101,9 @@ jobs:
101
run: |
102
VERSION="${{ steps.get_version.outputs.version }}"
103
if ${{ inputs.release_name == 'latest' }}; then
104
- VERSION="$VERSION-SNAPSHOT"
+ 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"
107
fi
108
echo "Final version: $VERSION"
109
echo "::set-output name=final_version::$VERSION"
0 commit comments