diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..97e9228 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,26 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + config-file: release-please-config.json + manifest-file: .release-please-manifest.json + - if: ${{ steps.release.outputs.release_created }} + steps: + - uses: actions/checkout@v4 + - name: Publish to cargo + env: + CARGO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} + run: cargo publish --token "${CARGO_TOKEN}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index c31008b..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Release - -on: - push: - # Sequence of patterns matched against refs/tags - tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - -jobs: - ubuntu: - name: Release to crates.io - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Publish to cargo - env: - CARGO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} - run: | - cargo publish --token "${CARGO_TOKEN}" \ No newline at end of file diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..6e7427c --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,10 @@ +{ + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": true, + "last-release-sha": "74c5ca507db8cb62e506600b8f4b41b2223c745a", + "packages": { + ".": { + "release-type": "rust" + } + } +} \ No newline at end of file