diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-05-03 22:57:25 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-05-03 22:58:29 +0300 |
commit | 990f87ed4074d36e92bf8e56c5ad4b0997d621af (patch) | |
tree | 1db8498c58c19ac12818fc1430727ff843087934 /.github | |
parent | add packaging metadata (diff) | |
download | vk-scripts-990f87ed4074d36e92bf8e56c5ad4b0997d621af.tar.gz vk-scripts-990f87ed4074d36e92bf8e56c5ad4b0997d621af.zip |
workflows/test: add a job to publish to PyPI
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/test.yml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6d7b055..4936d8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,3 +38,31 @@ jobs: - name: Run the tests run: ./.ci/bin/main.sh + + publish_pypi: + needs: [test] + runs-on: ubuntu-18.04 + name: Publish + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3 + - name: Install tools + run: python3 -m pip install --upgrade build + - name: Build package + run: python3 -m build + - name: Upload dist + uses: actions/upload-artifact@v2 + with: + name: dist + path: dist + if-no-files-found: error + - name: Publish package + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: '${{ secrets.PYPI_API_TOKEN }}' |