diff --git a/.github/workflows/main-build-and-deploy-oss.yml b/.github/workflows/main-build-and-deploy-oss.yml index 52a183f..303959b 100644 --- a/.github/workflows/main-build-and-deploy-oss.yml +++ b/.github/workflows/main-build-and-deploy-oss.yml @@ -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: @@ -93,6 +105,7 @@ jobs: deploy: name: Deploy to Maven Central runs-on: ubuntu-latest + environment: release-secrets #needs: [blackduck, build] needs: [build] steps: @@ -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 }}