File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
3737 ORG_GRADLE_PROJECT_signingInMemoryKey : ${{ secrets.SIGNING_KEY }}
3838 ORG_GRADLE_PROJECT_signingInMemoryKeyPassword : ${{ secrets.SIGNING_KEY_PASSWORD }}
39+
40+ - name : Get Gradle project version
41+ id : get_version
42+ run : |
43+ VERSION=$(./gradlew properties -q | grep '^version:' | awk '{print $2}')
44+ COMMIT_COUNT=$(./gradlew properties -q | grep '^commitCount:' | awk '{print $2}')
45+ TAGS=$(git tag --points-at HEAD)
46+
47+ echo "Project version: $VERSION, commit Count: $COMMIT_COUNT, tags: $TAGS"
48+
49+ if [ -z "$TAGS" ]; then
50+ echo "is_tagged=false" >> $GITHUB_OUTPUT
51+ else
52+ echo "is_tagged=true" >> $GITHUB_OUTPUT
53+ fi
54+ echo "version=$VERSION" >> $GITHUB_OUTPUT
55+ echo "commit_count=$COMMIT_COUNT" >> $GITHUB_OUTPUT
56+
57+ - name : Github Release
58+ if : |
59+ startsWith(github.ref, 'refs/heads/release/v') &&
60+ steps.get_version.outputs.is_tagged == 'true'
61+ uses : softprops/action-gh-release@v2.1.0
62+ with :
63+ name : ${{ steps.get_version.outputs.version }}
64+ prerelease : ${{ steps.get_version.outputs.commit_count != '0' }}
65+ files : |
66+ transact/build/libs/*.jar
67+ transact-cli/build/libs/dbos.jar
68+
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ println("DBOS Transact version: $calculatedVersion")
8181allprojects {
8282 group = " dev.dbos"
8383 version = calculatedVersion
84+ extra[" commitCount" ] = " $commitCount "
8485
8586 repositories {
8687 mavenCentral()
You can’t perform that action at this time.
0 commit comments