feat: Add release-please to build workflow

This commit is contained in:
Brian May 2025-02-08 08:33:14 +11:00
parent 3f0f88eb09
commit d910b64be7
No known key found for this signature in database
GPG Key ID: 2A92599257644AFA

31
.github/workflows/release-please.yml vendored Normal file
View File

@ -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 }}