rSpringRank v0.2.26 #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
release-job: | |
name: Build and publish on PyPI (${{ matrix.python-version }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-latest"] | |
python-version: ["3.10", "3.11"] | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: curl -sSL https://install.python-poetry.org | python3 - | |
- name: Install dependencies | |
run: poetry install --no-root | |
- name: Build package | |
run: poetry build | |
- name: Check sdist install and imports | |
run: | | |
mkdir -p test-sdist | |
cd test-sdist | |
python -m venv venv-sdist | |
venv-sdist/bin/python -m pip install ../dist/rspringrank-*.tar.gz | |
venv-sdist/bin/python -c "import rSpringRank" | |
- name: Check wheel install and imports | |
run: | | |
mkdir -p test-wheel | |
cd test-wheel | |
python -m venv venv-wheel | |
venv-wheel/bin/python -m pip install ../dist/rspringrank-*.whl | |
venv-wheel/bin/python -c "import rSpringRank" | |
- name: Publish to PyPI | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
poetry config pypi-token.pypi $POETRY_PYPI_TOKEN_PYPI --local | |
poetry publish --build |