PySR / .github /workflows /pypi_deploy.yml
MilesCranmer's picture
Fix PyPI deployment job
31ffc0e
raw
history blame
1.08 kB
name: Deploy PyPI
on:
push:
tags:
- 'v*.*.*'
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- name: Wait for tests to pass
uses: lewagon/wait-on-check-action@v1.2.0
with:
ref: ${{ github.ref }}
check-name: 'Linux'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Checkout"
uses: actions/checkout@v3
- name: "Set up Python"
uses: actions/setup-python@v4
with:
python-version: 3.10.8
- name: "Install building tools"
run: pip install wheel
- name: "Build package"
run: python setup.py sdist bdist_wheel
- name: "Publish distribution πŸ“¦ to Test PyPI"
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: "Publish distribution πŸ“¦ to PyPI"
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}