Skip to content

fix(ci): wheel and sdist artifacts should get uploaded to shared artifact dir #663

fix(ci): wheel and sdist artifacts should get uploaded to shared artifact dir

fix(ci): wheel and sdist artifacts should get uploaded to shared artifact dir #663

Workflow file for this run

name: Build
on:
pull_request:
release:
types:
- published
jobs:
build_wheel:
name: Build wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Include all history and tags
with:
fetch-depth: 0
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'
- name: Build wheels
run: |
pip install wheel
pip wheel --no-deps -w dist .
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: artifact-wheel
path: dist/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Include all history and tags
with:
fetch-depth: 0
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'
- name: Build sdist
run: |
python setup.py sdist
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: artifact-sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheel, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: artifact-sdist
path: dist
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: artifact-wheel
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
repository-url: https://test.pypi.org/legacy/