Skip to content

Bump setuptools from 78.1.1 to 83.0.0 (#98) #222

Bump setuptools from 78.1.1 to 83.0.0 (#98)

Bump setuptools from 78.1.1 to 83.0.0 (#98) #222

Workflow file for this run

name: Build and Publish
on:
push:
permissions:
contents: read
id-token: write
concurrency:
group: ${{ github.workflow }}${{ github.ref_name != github.event.repository.default_branch && github.ref || github.run_id }}
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }}
env:
PYTHON_VERSION: '3.10'
jobs:
buildAndPublish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
- name: Pre-commit
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
with:
extra_args: --hook-stage manual --all-files
- name: Run Tests
run: |
pip install poetry
poetry install --with dev
. ./.venv/bin/activate
pytest .
rm -rf .venv
- name: Publish to PYPI
if: github.ref_name == 'main'
run: |
pip install poetry
poetry config virtualenvs.create false
poetry build
# basemath is already present as a package (as in math with bases), so use a slightly different name
poetry publish --skip-existing -u "__token__" --password "$PYPI_TOKEN"
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}