Skip to content

mittinatten publishing freesasa-python #21

mittinatten publishing freesasa-python

mittinatten publishing freesasa-python #21

Workflow file for this run

name: Publish PyPi package for all platforms
run-name: ${{ github.actor }} publishing freesasa-python
on:
release:
types: [published]
jobs:
Publish:
env:
USE_CYTHON: 1
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
strategy:
matrix:
os: [macos-latest, windows-latest] # we'll use the sdist for linux
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
exclude:
- os: macos-latest
python-version: 3.11
runs-on: ${{ matrix.os }}
steps:
- name: "Check out code"
uses: actions/checkout@v3
- name: "Get upstream C library"
run: git submodule update --init
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
cache: "pip"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
- name: Run tests
run: python setup.py test
- name: Build package
run: python setup.py bdist_wheel
- name: Build sdist
# same source for all versions
if: ${{ matrix.os == 'macos-latest' && matrix.python-version == '3.10' }}
run: python setup.py sdist
- name: Publish package on Mac
if: ${{ matrix.os == 'macos-latest' }}
run: twine upload --skip-existing dist/*
- name: Publish package on Windows
if: ${{ matrix.os == 'windows-latest' }}
run: twine upload --skip-existing dist\*