File tree Expand file tree Collapse file tree 1 file changed +9
-13
lines changed
Expand file tree Collapse file tree 1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -2,36 +2,32 @@ id: generate-publish-sdk-new
22on :
33 workflow_dispatch :
44 inputs :
5- snapshot :
6- type : checkbox
7- description : " Is a snapshot release? "
5+ version :
6+ type : string
7+ description : " Version to publish. For snapshot releases, add `-SNAPSHOT` suffix to the version. For example, `1.0.0-SNAPSHOT`. "
88 required : true
99 default : true
1010
1111jobs :
1212 generate-and-publish :
1313 runs-on : ubuntu-latest
1414 steps :
15- - name : Checkout Repository
16- uses : actions/checkout@v4
15+ - uses : actions/checkout@v4
1716
18- - name : Set Up JDK
19- uses : actions/setup-java@v3
17+ - uses : actions/setup-java@v3
2018 with :
2119 distribution : ' corretto'
2220 java-version : ' 21'
2321
24- - name : Setup Gradle
25- uses : gradle/actions/setup-gradle@v4
22+ - uses : gradle/actions/setup-gradle@v4
2623 with :
2724 gradle-version : " 8.13"
2825
2926 - name : Install Post Processor
3027 working-directory : generator/src/main/resources/post-processor
3128 run : npm ci && npm run clean && npm run compile
3229
33- - name : Build Project
34- run : gradle build
30+ - run : gradle build
3531
3632 - name : Generate SDK
3733 working-directory : generator
5753 SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
5854 SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
5955 run : |
60- if [ -z "${{ github.event.inputs.snapshot }}" ]; then
56+ version="${{ github.event.inputs.version }}"
57+ if [[ "${v// /}" == *"-SNAPSHOT" ]]; then
6158 gradle publishSnapshot
6259 else
63- exit 1
6460 gradle publishToSonatype closeAndReleaseSonatypeStagingRepository
6561 fi
You can’t perform that action at this time.
0 commit comments