From 33d3b388ba33617da9a5d35c9137e4dc9044f935 Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Thu, 16 Nov 2023 09:26:08 +0100 Subject: [PATCH] DAT-13175 Full automation of OSS extension release (#129) * DAT-13175 * chore(release-drafter.yml): update Full Changelog link to include version prefix for better readability feat(extension-attach-artifact-release.yml): set draft release title to include the artifact id and version for better clarity and organization --- .github/release-drafter.yml | 2 +- .github/workflows/create-release.yml | 2 +- .../extension-attach-artifact-release.yml | 15 +++++++++++---- .github/workflows/extension-release-prepare.yml | 2 +- .github/workflows/extension-release-published.yml | 2 +- .github/workflows/os-extension-test.yml | 4 ++-- .github/workflows/package-linux.yml | 10 +++++----- .github/workflows/pom-release-published.yml | 2 +- .github/workflows/pro-extension-test.yml | 4 ++-- 9 files changed, 25 insertions(+), 18 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index a368625c..1a61b3d9 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -52,4 +52,4 @@ template: | $CHANGES - **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$REPOSITORY-$RESOLVED_VERSION + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$REPOSITORY-v$RESOLVED_VERSION diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index da2ef5f8..4d04081d 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -11,7 +11,7 @@ on: jobs: sonar: - uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.5.6 + uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.5.7 secrets: inherit with: extraCommand: ${{ inputs.extraCommand }} diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index c2fa9f67..eb51902c 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -85,9 +85,9 @@ jobs: - name: Get Reusable Script Files run: | - curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.6/.github/get_draft_release.sh - curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.6/.github/sign_artifact.sh - curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.6/.github/upload_asset.sh + curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.7/.github/get_draft_release.sh + curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.7/.github/sign_artifact.sh + curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.7/.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 @@ -157,6 +157,13 @@ jobs: ./.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}-javadoc.jar ./.github/sign_artifact.sh ./target/${{ env.artifact_id }}-${version}-sources.jar + - name: Set draft release title + id: set-release-title + run: | + RELEASE_TITLE="Support for Liquibase ${{ github.event.repository.name }} Extension v${{ env.artifact_id }}" + echo "Updating release title to $RELEASE_TITLE" + curl -X PATCH -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: Bearer ${{ secrets.BOT_TOKEN }}" -d '{"name": "'"$RELEASE_TITLE"'"}' "https://api.github.com/repos/${{ github.repository }}/releases/${{ env.RELEASE_ID }}" + - name: Attach Files to Draft Release id: upload-release-asset run: ./.github/upload_asset.sh $(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) @@ -168,7 +175,7 @@ jobs: - name: Get upload_zip.sh Script File if: inputs.zip == 'true' run: | - curl -o $PWD/.github/upload_zip.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.6/.github/upload_zip.sh + curl -o $PWD/.github/upload_zip.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.7/.github/upload_zip.sh chmod +x $PWD/.github/upload_zip.sh - name: Attach Zip File to Draft Release diff --git a/.github/workflows/extension-release-prepare.yml b/.github/workflows/extension-release-prepare.yml index 16a3abde..747ad623 100644 --- a/.github/workflows/extension-release-prepare.yml +++ b/.github/workflows/extension-release-prepare.yml @@ -105,7 +105,7 @@ jobs: release-rollback: needs: prepare-release if: ${{ always() && contains(needs.*.result, 'failure') }} - uses: liquibase/build-logic/.github/workflows/extension-release-rollback.yml@v0.5.6 + uses: liquibase/build-logic/.github/workflows/extension-release-rollback.yml@v0.5.7 secrets: inherit with: extraCommand: ${{ inputs.extraCommand }} diff --git a/.github/workflows/extension-release-published.yml b/.github/workflows/extension-release-published.yml index 143179d6..308e498b 100644 --- a/.github/workflows/extension-release-published.yml +++ b/.github/workflows/extension-release-published.yml @@ -134,7 +134,7 @@ jobs: maven-release: needs: release - uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.5.6 + uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.5.7 secrets: inherit with: extraCommand: ${{ inputs.extraCommand }} \ No newline at end of file diff --git a/.github/workflows/os-extension-test.yml b/.github/workflows/os-extension-test.yml index 58e439bb..20e08d9a 100644 --- a/.github/workflows/os-extension-test.yml +++ b/.github/workflows/os-extension-test.yml @@ -6,7 +6,7 @@ on: java: description: 'Java version to test' required: false - default: '[8, 11, 17, 18]' + default: '[11, 17, 21]' type: string os: description: 'Operating system to test' @@ -175,7 +175,7 @@ jobs: sonar-pr: needs: [ unit-test ] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.5.6 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.5.7 secrets: inherit with: extraCommand: ${{ inputs.extraCommand }} diff --git a/.github/workflows/package-linux.yml b/.github/workflows/package-linux.yml index a74e0d1e..374a490a 100644 --- a/.github/workflows/package-linux.yml +++ b/.github/workflows/package-linux.yml @@ -64,11 +64,11 @@ jobs: # Under the src folder is where specific packages files live. The GitHub action inputs will modify the universal package-deb-pom.xml to tell the process which assets to use during the packaging step mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/deb/control mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/main/archive - curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.5.6/src/${{ inputs.artifactId }}/deb/control/control - curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.5.6/src/${{ inputs.artifactId }}/deb/control/postinst - curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.6/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh - curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.5.6/.github/package-deb-pom.xml - curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.6/.github/sign_artifact.sh + curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.5.7/src/${{ inputs.artifactId }}/deb/control/control + curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.5.7/src/${{ inputs.artifactId }}/deb/control/postinst + curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.7/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh + curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.5.7/.github/package-deb-pom.xml + curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.5.7/.github/sign_artifact.sh chmod +x $PWD/.github/sign_artifact.sh - name: Import GPG key diff --git a/.github/workflows/pom-release-published.yml b/.github/workflows/pom-release-published.yml index ba9ef7e1..f5816fe4 100644 --- a/.github/workflows/pom-release-published.yml +++ b/.github/workflows/pom-release-published.yml @@ -68,5 +68,5 @@ jobs: maven-release: needs: release - uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.5.6 + uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.5.7 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 51b0b4ef..4dc98a7d 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -6,7 +6,7 @@ on: java: description: 'Java version to test' required: false - default: '[8, 11, 17, 18]' + default: '[11, 17, 21]' type: string os: description: 'Operating system to test' @@ -236,7 +236,7 @@ jobs: sonar-pr: needs: [ unit-test ] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.5.6 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.5.7 secrets: inherit with: extraCommand: ${{ inputs.extraCommand }}