Skip to content

version 2.22.0

version 2.22.0 #35

Workflow file for this run

# This workflow is triggered by a new release on GitHub and then uploads
# MulensModel package to PyPI.
name: Upload Python Package to PyPI
on:
release:
types: [published]
workflow_dispatch:
jobs:
build_wheels:
name: ${{ matrix.os }} ${{ matrix.cibw_archs }} ${{ matrix.cibw_build }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# A matrix of OSs, Python verisons, and architectures
# Skips PyPy
os: [ubuntu-latest, macos-latest]
cibw_archs: [auto64]
cibw_build: [cp37-*, cp38-*, cp39-*, cp310-*, cp311-*]
cibw_skip: [pp*]
include:
# MacOS Silicon (Python >= 3.8)
- {os: macos-latest, cibw_archs: "arm64", cw_build: "cp38-*"}
- {os: macos-latest, cibw_archs: "arm64", cw_build: "cp39-*"}
- {os: macos-latest, cibw_archs: "arm64", cw_build: "cp310-*"}
- {os: macos-latest, cibw_archs: "arm64", cw_build: "cp311-*"}
steps:
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.cibw_archs }}
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_SKIP: ${{ matrix.cibw_skip }}
- uses: actions/upload-artifact@v3
with:
name: wheelhouse
path: ./wheelhouse/*.whl
build_source:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python setup.py sdist
- uses: actions/upload-artifact@v3
with:
name: sdist
path: ./dist/*.tar.gz
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [build_source, build_wheels]
steps:
- uses: actions/checkout@v3
- name: Download sdist artifacts to dist/
uses: actions/download-artifact@v3
with:
name: sdist
path: dist/
- name: Download wheelhouse artifacts to dist/
uses: actions/download-artifact@v3
with:
name: wheelhouse
path: dist/
- name: Publish package to PyPI
# All files in dist/ are published
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}