From 5da5c54415e99d0d489eea2aa7e471c5e6bd08e6 Mon Sep 17 00:00:00 2001 From: Piotr Kilczuk Date: Wed, 13 Jan 2021 14:36:36 +0100 Subject: [PATCH] Allow uploading Github Actions -> PyPI --- .github/workflows/pypi_upload.yaml | 27 ++++++++++++++++++++ .github/workflows/{build.yaml => tests.yaml} | 4 +-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pypi_upload.yaml rename .github/workflows/{build.yaml => tests.yaml} (96%) diff --git a/.github/workflows/pypi_upload.yaml b/.github/workflows/pypi_upload.yaml new file mode 100644 index 0000000..5cc733d --- /dev/null +++ b/.github/workflows/pypi_upload.yaml @@ -0,0 +1,27 @@ +name: PYPI Upload + +on: + - workflow_dispatch + +jobs: + pypi_upload: + name: pypi-upload + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.9 + - name: Build Package + run: | + pip install wheel + python setup.py sdist bdist_wheel + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + skip_existing: true + verbose: true diff --git a/.github/workflows/build.yaml b/.github/workflows/tests.yaml similarity index 96% rename from .github/workflows/build.yaml rename to .github/workflows/tests.yaml index 7083542..431d05d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/tests.yaml @@ -1,4 +1,4 @@ -name: build +name: tests on: - push @@ -6,7 +6,7 @@ on: jobs: test: - name: build + name: tests runs-on: ubuntu-latest strategy: matrix: