Skip to content

fix(ci): update release workflow #1854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
version: ${{ format('{0}{1}', steps.version_release.outputs.version, steps.version_snapshot.outputs.version) }}
build_matrix: ${{ format('{0}{1}', steps.build_matrix_v1.outputs.build_matrix, steps.build_matrix_v1.outputs.build_matrix) }}
build_matrix: ${{ format('{0}{1}', steps.build_matrix_v1.outputs.build_matrix, steps.build_matrix_v2.outputs.build_matrix) }}
steps:
- id: version_snapshot
if: ${{ inputs.snapshot }}
Expand Down Expand Up @@ -161,6 +161,7 @@ jobs:
- setup
- quality
- version_seal
if: ${{ always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
strategy:
matrix:
java: ${{ fromJson(needs.setup.outputs.build_matrix) }}
Expand All @@ -183,7 +184,7 @@ jobs:

publish:
runs-on: ubuntu-latest
if: ${{ github.repository == 'aws-powertools/powertools-lambda-java' }}
if: ${{ github.repository == 'aws-powertools/powertools-lambda-java' && inputs.skip_publish == false }}
needs:
- build
environment: Release
Expand All @@ -201,6 +202,9 @@ jobs:
cache: maven
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
gpg-passphrase: GPG_PASSPHRASE
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: mvn -Prelease clean deploy -DskipTests
env:
Expand All @@ -210,7 +214,7 @@ jobs:

create_pr:
runs-on: ubuntu-latest
if: ${{ inputs.snapshot == false }}
if: ${{ inputs.snapshot == false && always() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
needs:
- build
- publish
Expand Down
Loading