Skip to content

Commit

Permalink
Provide libVersionSuffix="SNAPSHOT" from build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sczerwinski committed Dec 12, 2020
1 parent 05ede2c commit 2277de7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
snapshot:
name: Publish To OSSRH Snapshot Repository
if: (github.event_name != 'pull_request') && (github.ref == 'refs/heads/main')
needs: properties
needs: gradleValidation
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
Expand All @@ -138,5 +138,4 @@ jobs:
SIGNING_PASS: ${{ secrets.SIGNING_PASS }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
VERSION: ${{ needs.properties.outputs.version }}-SNAPSHOT
run: ./gradlew publish -PlibVersion="${VERSION}" -Psigning.secretKeyRingFile=../../secring.gpg -Psigning.password="${SIGNING_PASS}" -Psigning.keyId="${SIGNING_KEY_ID}" --stacktrace
run: ./gradlew publish -PlibVersionSuffix="SNAPSHOT" -Psigning.secretKeyRingFile=../../secring.gpg -Psigning.password="${SIGNING_PASS}" -Psigning.keyId="${SIGNING_KEY_ID}" --stacktrace
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ allprojects {
val libVersionSuffix: String by project

group = libGroupId
version = if (libVersion.endsWith("SNAPSHOT")) libVersion else "$libVersion-$libVersionSuffix"
version = if (libVersionSuffix.isBlank()) libVersion else "$libVersion-$libVersionSuffix"

repositories {
google()
Expand Down

0 comments on commit 2277de7

Please sign in to comment.