mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-22 13:30:11 +08:00
* 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>
42 lines
1.0 KiB
YAML
42 lines
1.0 KiB
YAML
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 }}
|