diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index fad82bb8..7f172f26 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -5,7 +5,7 @@ on: jobs: sonar: - uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.3.2 + uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.3.3 secrets: inherit create-release: diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 865ce895..ea639e56 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -14,6 +14,11 @@ on: required: true jobs: + + release-prepare: + uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.3.3 + secrets: inherit + attach-to-release: name: Attach Artifact to Release if: github.event.pull_request.merged == true @@ -24,31 +29,25 @@ jobs: - name: Get Reusable Script Files run: | - curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.2/.github/get_draft_release.sh - curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.2/.github/sign_artifact.sh - curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.2/.github/upload_asset.sh + curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.3/.github/get_draft_release.sh + curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.3/.github/sign_artifact.sh + curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.3/.github/upload_asset.sh chmod +x $PWD/.github/get_draft_release.sh chmod +x $PWD/.github/sign_artifact.sh chmod +x $PWD/.github/upload_asset.sh + - name: Update branch with latest commits # needed for getting the latest pom.xml generated by release-prepare step + run: | + git pull origin ${{ env.GITHUB_REF_NAME }} + git checkout HEAD~1 + - name: Get Artifact ID id: get-artifact-id run: echo "artifact_id=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_ENV - - name: Download artifact - id: download-artifact - uses: dawidd6/action-download-artifact@v2 - with: - github_token: ${{secrets.BOT_TOKEN}} - workflow: test.yml - pr: ${{github.event.pull_request.number}} - name: ${{ env.artifact_id }}-artifacts - path: ./assets - repo: ${{ github.repository }} - check_artifacts: true - skip_unpack: false - if_no_artifact_found: fail - workflow_conclusion: "" + - name: Build release artifacts + id: build-release-artifacts + run: mvn clean install -DskipTests - name: Get Release Tag id: get-release-tag @@ -77,10 +76,10 @@ jobs: run: | gpg -K version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - ./.github/sign_artifact.sh ./assets/${{ env.artifact_id }}-${version}.jar - ./.github/sign_artifact.sh ./assets/${{ env.artifact_id }}-${version}.pom - ./.github/sign_artifact.sh ./assets/${{ env.artifact_id }}-${version}-javadoc.jar - ./.github/sign_artifact.sh ./assets/${{ env.artifact_id }}-${version}-sources.jar + ./.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}.jar + ./.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}.pom + ./.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}-javadoc.jar + ./.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}-sources.jar - name: Attach Files to Draft Release id: upload-release-asset @@ -88,4 +87,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} ASSET_NAME_PREFIX: "${{ env.artifact_id }}-" - ASSET_DIR: ./assets + ASSET_DIR: ./target diff --git a/.github/workflows/os-extension-test.yml b/.github/workflows/os-extension-test.yml index b36fe14c..4e33987c 100644 --- a/.github/workflows/os-extension-test.yml +++ b/.github/workflows/os-extension-test.yml @@ -78,5 +78,5 @@ jobs: sonar-pr: needs: [ unit-test ] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.3.2 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.3.3 secrets: inherit diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 27145b39..831be56b 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -98,5 +98,5 @@ jobs: sonar-pr: needs: [ unit-test ] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.3.2 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.3.3 secrets: inherit