Skip to content
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
65 changes: 39 additions & 26 deletions .github/workflows/main-build-and-deploy-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,37 +39,49 @@ jobs:
maven-version: ${{ env.MAVEN_VERSION }}
java-version: ${{ env.JAVA_VERSION }}

update-version:
name: Update Version
# update-version:
# name: Update Version
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# token: ${{ secrets.GH_TOKEN }}
# - name: Update version
# uses: ./.github/actions/newrelease
# with:
# java-version: ${{ env.JAVA_VERSION }}
# maven-version: ${{ env.MAVEN_VERSION }}
# - name: Upload Changed Artifacts
# uses: actions/upload-artifact@v4
# with:
# name: root-new-version
# path: .
# include-hidden-files: true
# retention-days: 1
requires-approval:
runs-on: ubuntu-latest
name: "Waiting for release approval"
environment: Release-Approval
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- name: Update version
uses: ./.github/actions/newrelease
with:
java-version: ${{ env.JAVA_VERSION }}
maven-version: ${{ env.MAVEN_VERSION }}
- name: Upload Changed Artifacts
uses: actions/upload-artifact@v4
with:
name: root-new-version
path: .
include-hidden-files: true
retention-days: 1

- name: Approval Step
run: echo "Release has been approved!"

build:
#name: Build and Sonar Scan
name: Build
runs-on: ubuntu-latest
needs: update-version
#needs: update-version
needs: requires-approval
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: root-new-version
- name: Checkout
uses: actions/checkout@v4
# - name: Download artifact
# uses: actions/download-artifact@v4
# with:
# name: root-new-version
- name: Build
uses: ./.github/actions/build
with:
Expand All @@ -93,6 +105,7 @@ jobs:
deploy:
name: Deploy to Maven Central
runs-on: ubuntu-latest
environment: release-secrets
#needs: [blackduck, build]
needs: [build]
steps:
Expand All @@ -103,8 +116,8 @@ jobs:
- name: Deploy
uses: ./.github/actions/deploy-release
with:
user: ${{ secrets.CENTRAL_REPOSITORY_USER }}
password: ${{ secrets.CENTRAL_REPOSITORY_PASS }}
user: ${{ secrets.CAP_JAVA_CDS_FEATURE_EVENT_HUB_USER }}
password: ${{ secrets.CAP_JAVA_CDS_FEATURE_EVENT_HUB_PASS }}
pgp-pub-key: ${{ secrets.PGP_PUBKEY_ID }}
pgp-private-key: ${{ secrets.PGP_PRIVATE_KEY }}
pgp-passphrase: ${{ secrets.PGP_PASSPHRASE }}
Expand Down
Loading