From 1c808d63c87556c9610f19c2546c55ed8e4f4f58 Mon Sep 17 00:00:00 2001 From: David Roesel Date: Sat, 14 Oct 2023 17:15:00 +0200 Subject: [PATCH] Create publish.yml --- .github/workflows/publish.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..afda0db --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,37 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + # Specifying a GitHub environment is optional, but strongly encouraged + environment: release + permissions: + # This permission is mandatory for trusted publishing + id-token: write + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.9' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1