@@ -5,10 +5,12 @@ name: Publish to Maven Central
55# Trigger this workflow whenever code is pushed to "master" branch.defaults:
66# We would like to publish to maven central for both snapshot and release versions.
77on :
8- push :
9- branches : [ master ]
10-
11-
8+ workflow_dispatch :
9+ inputs :
10+ release_candidate :
11+ description : The release candidate number
12+ required : true
13+ default : ' 1'
1214# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1315jobs :
1416 # This workflow contains a single job called "build"
@@ -18,25 +20,25 @@ jobs:
1820
1921 # Steps represent a sequence of tasks that will be executed as part of the job
2022 steps :
21- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22- - uses : actions/checkout@v2
23-
24- - name : Gradle wrapper validation
25- uses : gradle/wrapper-validation-action@v1
26-
27- # Runs a single command using the runners shell
28- - name : Install gpg secret key
29- run : |
30- cat <(echo -e "${{ secrets.GPG_SECRET_KEY }}") | gpg --batch --import
31- gpg --export-secret-keys >$HOME/.gnupg/secring.gpg
32- gpg --list-secret-keys --keyid-format LONG
33- ls -l $HOME/.gnupg
34-
35- # FIXME Check https://github.com/allure-framework/allure2/blob/430255d8cf5c236ed29bc0df0b72dcd9389c3df9/.github/workflows/release.yaml
36- # - name: Publish release
37- # run: |
38- # ./gradlew -PghNexusUsername=${{ secrets.SONATYPE_USER }} -PghNexusPassword=${{ secrets.SONATYPE_PASSWORD }} -Psigning.secretKeyRingFile=$HOME/.gnupg/secring.gpg -Psigning.password="" -Psigning.keyId=${{ secrets.GPG_KEY_ID }} -Prc=1 prepareVote
39-
40- # - name: Display next step
41- # run: |
42- # echo "Now go to https://oss.sonatype.org/index.html#stagingRepositories, select the repo, Close it and then Release it "
23+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
24+ - uses : actions/checkout@v3.5.0
25+
26+ - name : Gradle wrapper validation
27+ uses : gradle/wrapper-validation-action@v1.0.6
28+
29+ # Runs a single command using the runners shell
30+ - name : Install gpg secret key
31+ run : |
32+ cat <(echo -e "${{ secrets.GPG_SECRET_KEY }}") | gpg --batch --import
33+ gpg --export-secret-keys >$HOME/.gnupg/secring.gpg
34+ gpg --list-secret-keys --keyid-format LONG
35+ ls -l $HOME/.gnupg
36+
37+ # FIXME Check https://github.com/allure-framework/allure2/blob/430255d8cf5c236ed29bc0df0b72dcd9389c3df9/.github/workflows/release.yaml
38+ - name : Publish Release Candidate
39+ run : |
40+ ./gradlew -PghGitSourceUsername=cbeust -PghGitSourcePassword=${{ secrets.GITHUB_TOKEN }} -PghDryRun - PghNexusUsername=${{ secrets.SONATYPE_USER }} -PghNexusPassword=${{ secrets.SONATYPE_PASSWORD }} -Psigning.secretKeyRingFile=$HOME/.gnupg/secring.gpg -Psigning.password="" -Psigning.keyId=${{ secrets.GPG_KEY_ID }} -Prc=${{ github.event.inputs.release_candidate }} prepareVote
41+
42+ - name : Display next step
43+ run : |
44+ echo "Now run 'release-maven-central.yml' workflow using the same Release Candidate Number (rc #) "
0 commit comments