File tree Expand file tree Collapse file tree 2 files changed +26
-27
lines changed Expand file tree Collapse file tree 2 files changed +26
-27
lines changed Original file line number Diff line number Diff line change 1+ name : Create Release
2+ run-name : Creating draft release for ${{ github.ref_name }}
3+
4+ on :
5+ push :
6+ tags :
7+ - ' release-*'
8+
9+ jobs :
10+ release_job :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v3
14+ - run : |
15+ mvn -B clean package
16+ - id : version
17+ run : echo "::set-output name=number::`echo "${{ github.ref_name }}" | sed 's/release-//'`"
18+ - env :
19+ GH_TOKEN : ${{ github.token }}
20+ run : |
21+ gh release create ${{ github.ref_name }} \
22+ --draft \
23+ --generate-notes \
24+ --title 'WebLogic Image Tool ${{ steps.version.outputs.number }}' \
25+ installer/target/imagetool.zip
Original file line number Diff line number Diff line change @@ -162,40 +162,14 @@ pipeline {
162162 stage (' Sync' ) {
163163 when {
164164 branch ' main'
165- anyOf {
166- not { triggeredBy ' TimerTrigger' }
167- tag ' release-*'
168- }
165+ not { triggeredBy ' TimerTrigger' }
169166 }
170167 steps {
171168 build job : " wkt-sync" ,
172169 parameters : [ string(name : ' REPOSITORY' , value : ' weblogic-image-tool' ) ],
173170 wait : true
174171 }
175172 }
176- stage (' Create Draft Release' ) {
177- when {
178- tag ' release-*'
179- }
180- steps {
181- script {
182- env. TAG_VERSION_NUMBER = env. TAG_NAME . replaceAll(' release-' ,' ' ). trim()
183- }
184- withCredentials([string(credentialsId : ' wkt-github-token' , variable : ' GITHUB_API_TOKEN' )]) {
185- sh """
186- mkdir gh-cli
187- curl -sL https://github.com/cli/cli/releases/download/v2.28.0/gh_2.28.0_linux_amd64.tar.gz | tar xvzf - --strip-components=1 -C ./gh-cli
188- echo '${ GITHUB_API_TOKEN} ' | ./gh-cli/bin/gh auth login --with-token
189- ./gh-cli/bin/gh release create ${ TAG_NAME} \
190- --draft \
191- --generate-notes \
192- --title 'WebLogic Image Tool ${ TAG_VERSION_NUMBER} ' \
193- --repo https://github.com/oracle/weblogic-image-tool \
194- installer/target/imagetool.zip
195- """
196- }
197- }
198- }
199173 }
200174}
201175
You can’t perform that action at this time.
0 commit comments