Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to PyPI and TestPyPI | |
on: push | |
jobs: | |
build-windows: | |
name: Build on Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install pypa/build | |
run: python -m pip install build --user | |
- name: Build a binary wheel and a source tarball (Windows) | |
run: python -m build --sdist --wheel --outdir dist/ . | |
- name: Store the binary wheel | |
uses: actions/upload-artifact@v2 | |
with: | |
name: python-package-distributions | |
path: dist | |
build-linux: | |
name: Build on Linux | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install pypa/build | |
run: python -m pip install build --user | |
- name: Build a source tarball | |
run: python -m build --sdist --outdir dist/ . | |
- name: Install from source tarball | |
run: python -m pip install dist/*.tar.gz --user | |
- name: Store the binary wheel | |
uses: actions/upload-artifact@v2 | |
with: | |
name: python-package-distributions | |
path: dist | |
publish: | |
name: Publish to PyPI and TestPyPI | |
runs-on: ubuntu-20.04 | |
needs: | |
- build-windows | |
- build-linux | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4.1.7 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
# - name: Publish distribution 📦 to Test PyPI | |
# uses: pypa/gh-action-pypi-publish@master | |
# with: | |
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
# repository_url: https://test.pypi.org/legacy/ | |
- name: Publish distribution 📦 to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |