Skip to content

Tox: Rework environment list to actually work #168

Tox: Rework environment list to actually work

Tox: Rework environment list to actually work #168

Workflow file for this run

# vim: et
on:
push:
jobs:
common:
uses: ./.github/workflows/common.yml
publish-test:
name: Publish pushes to PyPi's test instance
if: github.event_name == 'push'
needs:
- common
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: 3.11
cache: pip
- name: Prepare pip and install build
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Make the version number unique (on non-tag pushes)
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
run: |
python update-version-for-test-push.py
- name: Build source and wheel distributions
run: |
python -m build .
- name: Publish pushes to PyPI test
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33
with:
repository-url: https://test.pypi.org/legacy/
publish-prod:
name: Publish tags to PyPi production
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: common
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: 3.11
cache: pip
- name: Prepare pip and install build
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build source and wheel distributions
run: |
python -m build .
- name: Publish tags to PyPI production
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33