diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index 6c6451b..0000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,10 +0,0 @@ -[bumpversion] -current_version = 0.1.54 -commit = True -tag = True - -[bumpversion:file:setup.py] - -[bumpversion:file:pyproject.toml] - -[bumpversion:file:Cargo.toml] diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 35afe60..4d0b39f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,7 +13,7 @@ permissions: {} jobs: linux-wheels: - runs-on: ${{ matrix.target == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} + runs-on: ${{ matrix.target == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} permissions: contents: read strategy: @@ -170,10 +170,27 @@ jobs: path: wheels/ retention-days: 7 + release-please: + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + permissions: + contents: write + pull-requests: write + outputs: + release_created: ${{ steps.release.outputs.release_created }} + steps: + - uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 + id: release + publish-pypi: - needs: [collect-wheels] + needs: [collect-wheels, release-please] runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') + if: >- + ${{ + !cancelled() + && needs.collect-wheels.result == 'success' + && (startsWith(github.ref, 'refs/tags/v') || needs.release-please.outputs.release_created == 'true') + }} environment: name: pypi url: https://pypi.org/p/sqloxide diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 614a0ab..b6c72ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: run: cargo test test: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: contents: read strategy: diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..2ad97f6 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.61.1" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..609e5a9 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "packages": { + ".": { + "release-type": "rust", + "package-name": "sqloxide", + "include-component-in-tag": false, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true + } + } +}