Skip to content

Commit

Permalink
DAT-4565
Homebrew distribution (#169)
Browse files Browse the repository at this point in the history
* chore: update liquibase/build-logic workflows to use version v0.6.3 for
sonar-push, extension-attach-artifact-release, extension-release-rollback,
extension-release-published, os-extension-test, pom-release-published, and
pro-extension-test workflows

* chore(package.yml): add step to update Homebrew formula for ${{ inputs.artifactId }} on release
feat(package.yml): update Homebrew formula with liquibase version on release using GitHub Actions
  • Loading branch information
jandroav authored Feb 27, 2024
1 parent 82373cd commit 535892e
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 18 deletions.
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.6.2
uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.6.3
secrets: inherit
with:
extraCommand: ${{ inputs.extraCommand }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/extension-attach-artifact-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ jobs:
- name: Get Reusable Script Files
run: |
curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.6.2/.github/get_draft_release.sh
curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.6.2/.github/sign_artifact.sh
curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.6.2/.github/upload_asset.sh
curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.6.3/.github/get_draft_release.sh
curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.6.3/.github/sign_artifact.sh
curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.6.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
Expand Down Expand Up @@ -175,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.6.2/.github/upload_zip.sh
curl -o $PWD/.github/upload_zip.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.6.3/.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 @@ -107,7 +107,7 @@ jobs:
release-rollback:
needs: prepare-release
if: ${{ always() && contains(needs.*.result, 'failure') }}
uses: liquibase/build-logic/.github/workflows/extension-release-rollback.yml@v0.6.2
uses: liquibase/build-logic/.github/workflows/extension-release-rollback.yml@v0.6.3
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 @@ -23,7 +23,7 @@ on:

jobs:
maven-release:
uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.6.2
uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.6.3
secrets: inherit
with:
extraCommand: ${{ inputs.extraCommand }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/os-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ jobs:
sonar-pr:
if: ${{ !inputs.nightly }}
needs: [ unit-test ]
uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.6.2
uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.6.3
secrets: inherit
with:
extraCommand: ${{ inputs.extraCommand }}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ on:
description: 'GPG_SECRET_KEY_ID from the caller workflow'
required: true


env:
MAVEN_VERSION: '3.9.5'

jobs:

upload_packages:
upload_linux_packages:
name: Upload ${{ inputs.artifactId }} linux packages
runs-on: ubuntu-22.04
permissions:
Expand Down Expand Up @@ -61,11 +60,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.6.2/src/${{ inputs.artifactId }}/deb/control/control
curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.6.2/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.6.2/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.6.2/.github/package-deb-pom.xml
curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.6.2/.github/sign_artifact.sh
curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.6.3/src/${{ inputs.artifactId }}/deb/control/control
curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.6.3/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.6.3/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.6.3/.github/package-deb-pom.xml
curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.6.3/.github/sign_artifact.sh
chmod +x $PWD/.github/sign_artifact.sh
- name: Import GPG key
Expand Down Expand Up @@ -109,7 +108,7 @@ jobs:
sudo apt-get install -y alien
sudo alien --to-rpm --keep-version $PWD/.github/target/${{ inputs.artifactId }}-${{ inputs.version }}.deb
- name: Upload rpm package
- name: Upload ${{ inputs.artifactId }} rpm package
run: |
sudo apt-get install -y libcurl4-openssl-dev libbz2-dev libxml2-dev libssl-dev zlib1g-dev pkg-config libglib2.0-dev liblzma-dev libsqlite0-dev libsqlite3-dev librpm-dev libzstd-dev python3 cmake
./.github/sign_artifact.sh ${{ inputs.artifactId }}-${{ inputs.version }}-1.noarch.rpm
Expand All @@ -131,3 +130,20 @@ jobs:
mv ${{ inputs.artifactId }}-${{ inputs.version }}-1.noarch* $PWD/yum/noarch
aws s3 sync $PWD/yum s3://repo.liquibase.com/yum
- name: Update Homebrew formula for ${{ inputs.artifactId }}
uses: dawidd6/action-homebrew-bump-formula@v3
# Will set the following for the first time, then we can the line
continue-on-error: true
with:
token: ${{ secrets.BOT_TOKEN }}
no_fork: true
formula: liquibase
tag: "${{ github.event.release.tag_name }}"
force: true

upload_windows_package:
uses: liquibase/liquibase-chocolatey/.github/workflows/deploy-package.yml@master
secrets: inherit
with:
version: ${{ inputs.version }}

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.6.2
uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.6.3
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/pro-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ jobs:
sonar-pr:
if: ${{ !inputs.nightly }}
needs: [ unit-test ]
uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.6.2
uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.6.3
secrets: inherit
with:
extraCommand: ${{ inputs.extraCommand }}

0 comments on commit 535892e

Please sign in to comment.