xonsh/.github/workflows/publish.yml
2024-04-24 08:43:04 +02:00

40 lines
977 B
YAML

name: publish
on:
workflow_dispatch:
release:
types:
- published
permissions:
contents: read
jobs:
publish:
if: github.repository_owner == 'xonsh'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- name: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'pyproject.toml'
- name: install pypa/build
run: pip install build
- name: build sdist(tarball) to dist/
if: ${{ startsWith(matrix.python-version, '3.11') }}
run: python -m build . --sdist
- name: build bdist(wheel) to dist/
run: python -m build . --wheel
- name: publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1