Skip to content

Add temp branch for testing action #28

Add temp branch for testing action

Add temp branch for testing action #28

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ master, 'release-*', 'pypi_integration' ]
pull_request:
branches: [ $default-branch ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: tox
run: tox
build:
name: Build package for TestPyPI
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build release
run: |
python -m pip install --upgrade build
python -m build
- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/
publish:
name: Publish package to TestPyPI
runs-on: ubuntu-latest
needs: build
steps:
- name: Retrieve dist
uses: actions/download-artifact@v5
with:
name: release-dists
path: dist/
- name: Push to test pypi
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_TEST_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
verbose: true