chore(main): release 1.7.0 #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Please | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| env: | |
| # The ubuntu-latest runner has clang-18 + libclang pre-installed; | |
| # point bindgen at it so we can skip apt-get install libclang-dev. | |
| LIBCLANG_PATH: /usr/lib/llvm-18/lib | |
| jobs: | |
| release-please: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| version: ${{ steps.release.outputs.version }} | |
| steps: | |
| - uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| release-type: rust | |
| build: | |
| name: Build release binary | |
| runs-on: ubuntu-latest | |
| needs: release-please | |
| if: needs.release-please.outputs.release_created == 'true' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build release binary | |
| run: cargo build --release | |
| - name: Upload release binary | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: pg-migration-lint | |
| path: target/release/pg-migration-lint | |
| if-no-files-found: error | |
| build-bridge: | |
| name: Build Liquibase bridge JAR | |
| runs-on: ubuntu-latest | |
| needs: release-please | |
| if: needs.release-please.outputs.release_created == 'true' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build fat JAR with Maven (via Docker) | |
| run: | | |
| docker run --rm \ | |
| -v "$PWD/bridge:/build" \ | |
| -w /build \ | |
| maven:3.9-eclipse-temurin-21 \ | |
| sh -c 'mvn package -q -DskipTests && cp target/liquibase-bridge-1.0.0.jar target/liquibase-bridge.jar' | |
| - name: Upload bridge JAR | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: liquibase-bridge | |
| path: bridge/target/liquibase-bridge.jar | |
| if-no-files-found: error | |
| upload-assets: | |
| name: Upload release assets | |
| runs-on: ubuntu-latest | |
| needs: [release-please, build, build-bridge] | |
| steps: | |
| - name: Download release binary | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: pg-migration-lint | |
| path: artifacts | |
| - name: Download bridge JAR | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: liquibase-bridge | |
| path: artifacts | |
| - name: Prepare release assets | |
| run: | | |
| chmod +x artifacts/pg-migration-lint | |
| tar -czf pg-migration-lint-x86_64-linux.tar.gz -C artifacts pg-migration-lint | |
| cp artifacts/liquibase-bridge.jar liquibase-bridge.jar | |
| - name: Upload assets to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.release-please.outputs.tag_name }} | |
| files: | | |
| pg-migration-lint-x86_64-linux.tar.gz | |
| liquibase-bridge.jar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |