Skip to content

Update dependabot re: uv #57

Update dependabot re: uv

Update dependabot re: uv #57

Workflow file for this run

name: wheel
on:
push:
tags:
- '*'
pull_request:
branches: [ main ]
release:
types: [published]
jobs:
wheel_build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
activate-environment: true
version: "latest"
python-version: ${{ matrix.python }}
- name: build wheel
run: uv build
- name: upload wheel
uses: actions/upload-artifact@v5
with:
name: wheel-and-sdist
path: dist/
wheel_test:
runs-on: ${{ matrix.os }}
needs: ['wheel_build']
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: download wheel
uses: actions/download-artifact@v6.0.0
with:
name: wheel-and-sdist
path: dist/
- name: setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: install
run: pip install dist/demes-*.whl
- name: test
run: |
python -c "import demes"
demes --version
demes ms -N0 1 -I 2 0 0 0.1 -es 1 1 0.99 -ej 1 3 2 -ej 100 2 1 \
| demes parse -j - \
| demes parse -s - \
| demes parse --ms 1 -
pypi_upload:
runs-on: ubuntu-24.04
needs: ['wheel_test']
steps:
- name: download wheel
uses: actions/download-artifact@v6.0.0
with:
name: wheel-and-sdist
path: dist/
- name: publish to test.pypi.org
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: publish to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}