Skip to content

Create CITATION.cff #45

Create CITATION.cff

Create CITATION.cff #45

name: Build and upload to PyPI
# Build on every branch push, tag push, and pull request change:
on:
push:
branches: 'main'
pull_request:
branches: 'main'
jobs:
build_wheels:
name: Build wheels
runs-on: ubuntu-latest
# if not a pure python wheel, build on each os
# name: Build wheels on ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
# Since this is a pure python wheel we can just do this
- name: Build wheel
run: python -m pip wheel --no-binary ":serums:" -w dist --no-deps .
# if not a pure python wheel we need this
# - name: Build wheels
# uses: pypa/[email protected]
- uses: actions/upload-artifact@v3
with:
path: dist/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_test_pypi:
name: Upload to Test PyPI
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
if: github.event.action != 'published'
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- name: Publish distribution package 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/