Skip to content

Commit 70b8183

Browse files
authored
fix(ci): update release workflow (#1854)
* fix(ci): add user/pass to javasetup (#1832) * fix(ci): Update control flow to allow for better skipping of things (#1831)
1 parent c2e5b92 commit 70b8183

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
runs-on: ubuntu-latest
6868
outputs:
6969
version: ${{ format('{0}{1}', steps.version_release.outputs.version, steps.version_snapshot.outputs.version) }}
70-
build_matrix: ${{ format('{0}{1}', steps.build_matrix_v1.outputs.build_matrix, steps.build_matrix_v1.outputs.build_matrix) }}
70+
build_matrix: ${{ format('{0}{1}', steps.build_matrix_v1.outputs.build_matrix, steps.build_matrix_v2.outputs.build_matrix) }}
7171
steps:
7272
- id: version_snapshot
7373
if: ${{ inputs.snapshot }}
@@ -161,6 +161,7 @@ jobs:
161161
- setup
162162
- quality
163163
- version_seal
164+
if: ${{ always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
164165
strategy:
165166
matrix:
166167
java: ${{ fromJson(needs.setup.outputs.build_matrix) }}
@@ -183,7 +184,7 @@ jobs:
183184
184185
publish:
185186
runs-on: ubuntu-latest
186-
if: ${{ github.repository == 'aws-powertools/powertools-lambda-java' }}
187+
if: ${{ github.repository == 'aws-powertools/powertools-lambda-java' && inputs.skip_publish == false }}
187188
needs:
188189
- build
189190
environment: Release
@@ -201,6 +202,9 @@ jobs:
201202
cache: maven
202203
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
203204
gpg-passphrase: GPG_PASSPHRASE
205+
server-id: ossrh
206+
server-username: MAVEN_USERNAME
207+
server-password: MAVEN_PASSWORD
204208
- name: Publish package
205209
run: mvn -Prelease clean deploy -DskipTests
206210
env:
@@ -210,7 +214,7 @@ jobs:
210214

211215
create_pr:
212216
runs-on: ubuntu-latest
213-
if: ${{ inputs.snapshot == false }}
217+
if: ${{ inputs.snapshot == false && always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
214218
needs:
215219
- build
216220
- publish

0 commit comments

Comments
 (0)