Skip to content

Merge pull request #14 from sijiaww/fix-vmat-scp-dose-bug #9

Merge pull request #14 from sijiaww/fix-vmat-scp-dose-bug

Merge pull request #14 from sijiaww/fix-vmat-scp-dose-bug #9

Workflow file for this run

name: CI and Publish
on:
push:
branches:
- master
# Only trigger for changes inside portpy/
paths:
- 'portpy/**'
pull_request:
# Only trigger for PRs touching portpy/
paths:
- 'portpy/**'
release:
types: [published]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Run tests
run: pytest -v --maxfail=1 --disable-warnings
publish:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*