File tree Expand file tree Collapse file tree 2 files changed +56
-6
lines changed Expand file tree Collapse file tree 2 files changed +56
-6
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy Release Docs
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ releaseVersion :
7+ description : ' Version to deploy (tag or branch name)'
8+ required : true
9+ type : string
10+
11+ env :
12+ ARTIFACTORY_USERNAME : ${{ secrets.ARTIFACTORY_USERNAME }}
13+ ARTIFACTORY_PASSWORD : ${{ secrets.ARTIFACTORY_PASSWORD }}
14+
15+ jobs :
16+ deploy_docs :
17+ name : Deploy docs to Artifactory (release)
18+ if : github.repository == 'spring-projects-experimental/spring-pulsar'
19+ runs-on : ubuntu-latest
20+ steps :
21+ - id : checkout-source
22+ name : Checkout source code
23+ uses : actions/checkout@v2
24+ with :
25+ ref : ${{ inputs.releaseVersion }}
26+ token : ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
27+
28+ - name : Set up Gradle
29+ uses : spring-io/spring-gradle-build-action@v1
30+ with :
31+ java-version : ' 17'
32+ distribution : ' temurin'
33+
34+ - name : Build the artifacts
35+ run : |
36+ ./gradlew :spring-pulsar-docs:clean :spring-pulsar-docs:build
37+
38+ - name : Deploy the artifacts
39+ run : |
40+ ./gradlew :spring-pulsar-docs:deployDocs --info --PartifactoryUsername="$ARTIFACTORY_USERNAME" -PartifactoryPassword="$ARTIFACTORY_PASSWORD" --stacktrace
41+ env :
42+ ORG_GRADLE_PROJECT_signingKey : ${{ secrets.GPG_PRIVATE_KEY }}
43+ ORG_GRADLE_PROJECT_signingPassword : ${{ secrets.GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change @@ -191,16 +191,23 @@ artifactoryPublish {
191191 publications(publishing. publications. mavenJava)
192192}
193193
194+ tasks. register(' deployDocs' ) {
195+ dependsOn artifactoryPublish
196+ }
197+
194198signing {
195- required { project. hasProperty(" signing.keyId" ) || project. hasProperty(" signingKey" ) && gradle. taskGraph. hasTask(" publishArtifacts" ) }
196- def signingKeyId = (String ) project. findProperty(" signing.keyId" );
197- def signingKey = (String ) project. findProperty(" signingKey" );
198- def signingPassword = (String ) project. findProperty(" signingPassword" );
199+ required {
200+ project. hasProperty(" signing.keyId" ) || project. hasProperty(" signingKey" ) &&
201+ (gradle. taskGraph. hasTask(" publishArtifacts" ) || gradle. taskGraph. hasTask(" deployDocs" ))
202+ }
203+ def signingKeyId = (String ) project. findProperty(" signing.keyId" )
204+ def signingKey = (String ) project. findProperty(" signingKey" )
205+ def signingPassword = (String ) project. findProperty(" signingPassword" )
199206 if (signingKeyId != null ) {
200- useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword);
207+ useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
201208 }
202209 else {
203- useInMemoryPgpKeys(signingKey, signingPassword);
210+ useInMemoryPgpKeys(signingKey, signingPassword)
204211 }
205212 sign publishing. publications. mavenJava
206213}
You can’t perform that action at this time.
0 commit comments