diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 0000000..3c33e25 --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,14 @@ +name: Publish package to PyPI + +on: + release: + types: [published] + +jobs: + pypi_publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: JRubics/poetry-publish@v2.0 + with: + pypi_token: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/pypi-test.yml b/.github/workflows/pypi-test.yml new file mode 100644 index 0000000..4a91b89 --- /dev/null +++ b/.github/workflows/pypi-test.yml @@ -0,0 +1,21 @@ +name: Publish package to test.pypi + +on: + push: + tags: + - "v*.*.*.dev*" + - "v*.*.*.post*" + - "v*.*.*.rc*" + - "v*.*.*.a*" + - "v*.*.*.b*" + +jobs: + pypi_test_publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: JRubics/poetry-publish@v2.0 + with: + pypi_token: ${{ secrets.TEST_PYPI_TOKEN }} + repository_name: "testpypi" + repository_url: "https://test.pypi.org/legacy/"