mirror of
https://fuchsia.googlesource.com/third_party/github.com/pylint-dev/pylint
synced 2024-09-21 16:19:21 +00:00
38 lines
995 B
YAML
38 lines
995 B
YAML
|
name: Release
|
||
|
|
||
|
on:
|
||
|
release:
|
||
|
types:
|
||
|
- published
|
||
|
|
||
|
env:
|
||
|
DEFAULT_PYTHON: 3.9
|
||
|
|
||
|
jobs:
|
||
|
release-pypi:
|
||
|
name: Upload release to PyPI
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Check out code from Github
|
||
|
uses: actions/checkout@v2.3.4
|
||
|
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
|
||
|
id: python
|
||
|
uses: actions/setup-python@v2.2.2
|
||
|
with:
|
||
|
python-version: ${{ env.DEFAULT_PYTHON }}
|
||
|
- name: Install requirements
|
||
|
run: |
|
||
|
python -m pip install -U pip twine wheel
|
||
|
python -m pip install -U "setuptools>=56.0.0"
|
||
|
- name: Build distributions
|
||
|
run: |
|
||
|
python setup.py sdist bdist_wheel
|
||
|
- name: Upload to PyPI
|
||
|
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
|
||
|
env:
|
||
|
TWINE_REPOSITORY: pypi
|
||
|
TWINE_USERNAME: __token__
|
||
|
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
||
|
run: |
|
||
|
twine upload --verbose dist/*
|