Skip to content

Commit

Permalink
DAT-13175 Full automation of OSS extension release (#129)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jandroav authored Nov 16, 2023
1 parent e0c2fe6 commit 33d3b38
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/extension-attach-artifact-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/extension-release-prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/extension-release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions .github/workflows/os-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 }}
10 changes: 5 additions & 5 deletions .github/workflows/package-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pom-release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/pro-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 }}

0 comments on commit 33d3b38

Please sign in to comment.