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 <Borda@users.noreply.github.com> * Update .github/workflows/pypi_release.yml Co-Authored-By: Jirka Borovec <Borda@users.noreply.github.com> * Add releases to test.pypi Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
This commit is contained in:
parent
3cb149f4f4
commit
80dc9795bd
|
@ -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 }}
|
Loading…
Reference in New Issue