From 8192e1454cf464ea8fe28d69a42cae3631f6d101 Mon Sep 17 00:00:00 2001 From: Fabian Zills Date: Thu, 3 Oct 2024 12:01:04 +0200 Subject: [PATCH] publish action --- .github/workflows/publish.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..79ea289 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,31 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# GitHub recommends pinning actions to a commit SHA. +# To get a newer version, you will need to update the SHA. +# You can also reference a tag or branch, but the action may change without warning. + +name: Publish + +on: + release: + types: [published] + +jobs: + publish-pypi: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install Poetry + uses: snok/install-poetry@v1 + - name: Publish + env: + PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + run: | + poetry config pypi-token.pypi $PYPI_TOKEN + poetry publish --build