From d910b64be77fd7ef2a5f169b780bfda95e67318d Mon Sep 17 00:00:00 2001 From: Brian May Date: Sat, 8 Feb 2025 08:33:14 +1100 Subject: [PATCH] feat: Add release-please to build workflow --- .github/workflows/release-please.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/release-please.yml diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..cdb8e8a --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,31 @@ +on: + push: + branches: + - master + +permissions: + contents: write + pull-requests: write + +name: release-please + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: googleapis/release-please-action@v4 + with: + token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} + release-type: python + upload-pypi: + name: Upload to pypi + needs: [release-please] + if: ${{ needs.release_please.outputs.release_created == 'true' }} + runs-on: ubuntu-latest + steps: + - name: Publish PyPi package + uses: code-specialist/pypi-poetry-publish@v1 + with: + ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PUBLISH_REGISTRY: "https://test.pypi.org/simple/" + PUBLISH_REGISTRY_PASSWORD: ${{ secrets.PYPI_TOKEN }}