-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (30 loc) · 862 Bytes
/
publish-testpypi.yml
File metadata and controls
32 lines (30 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 }}