Skip to content

Update pre-commit hooks. #246

Update pre-commit hooks.

Update pre-commit hooks. #246

Workflow file for this run

on:
pull_request:
release:
types:
- published
name: Build
jobs:
python-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- name: Install build dependencies
run: python -m pip install build
- name: Build source distribution and wheel
run: python -m build --sdist --wheel
- uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*
upload-testpypi:
needs: [python-build]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: test_release
url: https://test.pypi.org/p/ivmodels
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
upload-pypi:
needs: [python-build, upload-testpypi]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: release
url: https://pypi.org/p/ivmodels
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1