Skip to content

Commit

Permalink
Automatic PyPi Release (Lightning-AI#1324)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
2 people authored and akarnachev committed Apr 3, 2020
1 parent fbf31c4 commit c0199e5
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/pypi_release.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit c0199e5

Please sign in to comment.