Skip to content

rSpringRank v0.2.28 #27

rSpringRank v0.2.28

rSpringRank v0.2.28 #27

Workflow file for this run

name: Release
on:
release:
types:
- created
permissions:
contents: read
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"]
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: curl -sSL https://install.python-poetry.org | python - -y
- name: Update PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Update Poetry configuration
run: poetry config virtualenvs.create false
- name: Install dependencies
run: poetry install --sync --no-interaction
- 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 package distributions to PyPI
uses: pypa/gh-action-pypi-publish@v1.9.0
# - 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