Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #4

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #4

Workflow file for this run

name: Build and upload to PyPI
on:
push:
pull_request:
release:
types:
- published
jobs:
build_wheels:
name: Build wheels for ${{ matrix.os }}-${{ matrix.python_version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# # Windows
# - os: windows-2016
# python: 37
# bitness: 64
# platform_id: win_amd64
# - os: windows-2016
# python: 38
# bitness: 64
# platform_id: win_amd64
# - os: windows-2016
# python: 39
# bitness: 64
# platform_id: win_amd64
# - os: windows-2016
# python: 310
# bitness: 64
# platform_id: win_amd64
# - os: windows-2016
# python: 311
# bitness: 64
# platform_id: win_amd64
# Linux
- os: ubuntu-latest
python_version: "3.7"
- os: ubuntu-latest
python_version: "3.8"
- os: ubuntu-latest
python_version: "3.9"
- os: ubuntu-latest
python_version: "3.10"
- os: ubuntu-latest
python_version: "3.11"
# MacOS x86_64
- os: macos-latest
python_version: "3.7"
- os: macos-latest
python_version: "3.8"
- os: macos-latest
python_version: "3.9"
- os: macos-latest
python_version: "3.10"
- os: macos-latest
python_version: "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: ${{ matrix.python_version }}
- name: Prepare Env
run: |
# pip install --upgrade pip
pip install --upgrade wheel
pip install --upgrade twine
pip install --upgrade setuptools
- name: Prepare Env
run: |
pip install -e .
python setup.py sdist
python setup.py bdist_wheel --universal
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'
- name: Build sdist
run: pip install setuptools_scm && python setup.py sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4.1.7
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.7.1
with:
# user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}