From 7d4e34d3ac607b7611df2a20781c036620a7574b Mon Sep 17 00:00:00 2001 From: ltenorio Date: Thu, 12 Dec 2024 13:46:33 +0100 Subject: [PATCH] add automated pypi release pipeline --- .github/workflows/publish.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 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..566af79 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,35 @@ +name: Publish + +on: + release: + types: + - created # Trigger on release creation + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - name: Install build dependencies + run: | + pip install --upgrade pip + pip install build + + - name: Build distribution + run: python -m build + + - name: Test Publish + uses: pypa/gh-action-pypi-publish@v1.12.3 + with: + repository-url: https://test.pypi.org/legacy/ + + - name: Publish + uses: pypa/gh-action-pypi-publish@v1.12.3