From d3bd64f060a8a169963edd76c4cdf6b11bf41bdc Mon Sep 17 00:00:00 2001 From: bretello Date: Sun, 29 Oct 2023 14:12:45 +0100 Subject: [PATCH] gha: add release workflow --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0894441 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Publish package to PyPI + +on: + release: + types: + - published + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: "3.9" + - name: Install requirements + run: | + pip install -U pip twine build + - name: Build + run: python -m build + - run: check-manifest + - run: twine check dist/* + - name: Publish to PyPI + env: + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: twine upload dist/*