From 80dc9795bd50dd2ad7a87815a5317f9ae6fdabac Mon Sep 17 00:00:00 2001 From: Justus Schock <12886177+justusschock@users.noreply.github.com> Date: Thu, 2 Apr 2020 17:47:37 +0200 Subject: [PATCH] Automatic PyPi Release (#1324) * Add Workflow for Automated pypi releases * Rename pypi_release to pypi_release.yml * Update .github/workflows/pypi_release.yml Co-Authored-By: Jirka Borovec * Update .github/workflows/pypi_release.yml Co-Authored-By: Jirka Borovec * Add releases to test.pypi Co-authored-by: Jirka Borovec --- .github/workflows/pypi_release.yml | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/pypi_release.yml diff --git a/.github/workflows/pypi_release.yml b/.github/workflows/pypi_release.yml new file mode 100644 index 0000000000..c3c45fcec2 --- /dev/null +++ b/.github/workflows/pypi_release.yml @@ -0,0 +1,41 @@ +name: PyPI Release + +on: [push] + +# based on https://github.com/pypa/gh-action-pypi-publish + +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.7] + + steps: + - uses: actions/checkout@master + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + + - name: Install dependencies + run: >- + python -m pip install --user --upgrade setuptools wheel + - name: Build + run: >- + python setup.py sdist bdist_wheel + + # We do this, since failures on test.pypi aren't that bad + - name: Publish to Test PyPI + if: startsWith(github.event.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.test_pypi_password }} + repository_url: https://test.pypi.org/legacy/ + + - name: Publish distribution 📦 to PyPI + if: startsWith(github.event.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.pypi_password }}