Skip to content

D. J.:

D. J.: #4

name: Publish TestPyPI
on:
push:
branches:
- master
- main
jobs:
publish-to-testpypi:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest"]
python-version: ["3.10"]
name: ${{ matrix.os }} python-${{ matrix.python-version }}
steps:
- name: Set up the repository
uses: actions/checkout@v4
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Update version for TestPyPI
run: |
VERSION_SUFFIX=$(date +%Y%m%d%H%M%S)
sed -i "s/^version = \"\(.*\)\"/version = \"\1.dev$VERSION_SUFFIX\"/" pyproject.toml
- name: Build package
run: |
uv build
- name: Publish to TestPyPI
run: |
uv publish --index testpypi --token ${{ secrets.TEST_PYPI_API_TOKEN }}