File tree Expand file tree Collapse file tree 5 files changed +47
-28
lines changed Expand file tree Collapse file tree 5 files changed +47
-28
lines changed Original file line number Diff line number Diff line change 11name : Publish Package
22description : ' Publish the package to Sonatype'
33inputs :
4- code_signing_keyring :
5- description : ' The path of the code signing keyring .'
4+ dry_run :
5+ description : ' Is this a dry run. If so no package will be published .'
66 required : true
77 prerelease :
88 description : ' Is this a prerelease. If so then it will be published to the staging repository only.'
99 required : true
10- dry_run :
11- description : ' Is this a dry run. If so no package will be published.'
10+ signing_key_id :
11+ description : ' Signing key ID'
12+ required : true
13+ signing_key_passphrase :
14+ description : ' Signing key passphrase'
15+ required : true
16+ code_signing_keyring :
17+ description : ' The path of the code signing keyring.'
18+ required : true
19+ sonatype_username :
20+ description : ' Sonatype repo username.'
21+ required : true
22+ sonatype_password :
23+ description : ' Sonatype repo password.'
1224 required : true
1325
1426runs :
1527 using : composite
1628 steps :
1729 - name : Publish Library
1830 shell : bash
19- if : ${{ inputs.dry_run == 'false' }}
2031 env :
2132 LD_RELEASE_IS_PRERELEASE : ${{ inputs.prerelease }}
33+ LD_RELEASE_IS_DRYRUN : ${{ inputs.dry_run }}
34+ SIGNING_KEY_ID : ${{ inputs.signing_key_id }}
35+ SIGNING_KEY_PASSPHRASE : ${{ inputs.signing_key_passphrase }}
36+ SIGNING_SECRET_KEY_RING_FILE : ${{ inputs.code_signing_keyring }}
37+ SONATYPE_USER_NAME : ${{ inputs.sonatype_username }}
38+ SONATYPE_PASSWORD : ${{ inputs.sonatype_password }}
2239 run : source $GITHUB_ACTION_PATH/publish.sh
23-
24- - name : Dry Run Publish Library
25- shell : bash
26- if : ${{ inputs.dry_run == 'true' }}
27- run : echo "Dry run. Not publishing."
Original file line number Diff line number Diff line change 22
33set -ue
44
5- echo " Publishing to Sonatype"
6- if [ " ${LD_RELEASE_IS_PRERELEASE} " == " true" ]; then
7- echo " PRERELEASE"
8- ./gradlew publishToSonatype -Psigning.keyId=" ${SIGNING_KEY_ID} " -Psigning.secretKeyRingFile=" ${SIGNING_SECRET_KEY_RING_FILE} " -PossrhUsername=" ${SONATYPE_USER_NAME} " -PossrhPassword=" ${SONATYPE_PASSWORD} " || {
9- echo " Gradle publish/release faile" >&2
10- exit 1
11- }
5+ if $LD_RELEASE_IS_DRYRUN ; then
6+ echo " Doing a dry run of publishing."
127else
13- echo " RELEASE"
14- ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository || {
15- echo " Gradle publish/release failed" >&2
16- exit 1
17- }
8+ echo " Publishing to Sonatype"
9+ if [ " ${LD_RELEASE_IS_PRERELEASE} " == " true" ]; then
10+ echo " PRERELEASE"
11+ ./gradlew publishToSonatype -Psigning.keyId=" ${SIGNING_KEY_ID} " -Psigning.password=" ${SIGNING_KEY_PASSPHRASE} " -Psigning.secretKeyRingFile=" ${SIGNING_SECRET_KEY_RING_FILE} " -PsonatypeUsername=" ${SONATYPE_USER_NAME} " -PsonatypePassword=" ${SONATYPE_PASSWORD} " || {
12+ echo " Gradle publish/release failed" >&2
13+ exit 1
14+ }
15+ else
16+ echo " RELEASE"
17+ ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Psigning.keyId=" ${SIGNING_KEY_ID} " -Psigning.password=" ${SIGNING_KEY_PASSPHRASE} " -Psigning.secretKeyRingFile=" ${SIGNING_SECRET_KEY_RING_FILE} " -PsonatypeUsername=" ${SONATYPE_USER_NAME} " -PsonatypePassword=" ${SONATYPE_PASSWORD} " || {
18+ echo " Gradle publish/release failed" >&2
19+ exit 1
20+ }
21+ fi
1822fi
Original file line number Diff line number Diff line change 5050 with :
5151 aws_assume_role : ${{ vars.AWS_ROLE_ARN }}
5252 ssm_parameter_pairs : ' /production/common/releasing/sonatype/username = SONATYPE_USER_NAME,
53- /production/common/releasing/sonatype/password = SONATYPE_PASSWORD
53+ /production/common/releasing/sonatype/password = SONATYPE_PASSWORD,
5454 /production/common/releasing/java/keyId = SIGNING_KEY_ID'
5555 s3_path_pairs : ' launchdarkly-releaser/java/code-signing-keyring.gpg = code-signing-keyring.gpg'
5656
5959 with :
6060 dry_run : ${{ inputs.dry_run }}
6161 prerelease : ${{ inputs.prerelease }}
62+ signing_key_id : ${{ env.SIGNING_KEY_ID }}
63+ signing_key_passphrase : ' '
6264 code_signing_keyring : ' code-signing-keyring.gpg'
65+ sonatype_username : ${{ env.SONATYPE_USER_NAME }}
66+ sonatype_password : ${{ env.SONATYPE_PASSWORD }}
Original file line number Diff line number Diff line change @@ -100,10 +100,7 @@ signing {
100100nexusPublishing {
101101 clientTimeout = java.time.Duration . ofMinutes(2 ) // we've seen extremely long delays in creating repositories
102102 repositories {
103- sonatype {
104- username = findProperty(" ossrhUsername" )
105- password = findProperty(" ossrhPassword" )
106- }
103+ sonatype()
107104 }
108105}
109106
Original file line number Diff line number Diff line change 11group = com.launchdarkly
2- version =0.2.2 # x-release-please-version
2+ # x-release-please-start-version
3+ version =0.2.2
4+ # x-release-please-version
You can’t perform that action at this time.
0 commit comments