-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.71 KB
/
publish_testpypi.yml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# .github/workflows/publish_testpypi.yml
---
name: test-n-build
on:
push:
tags:
- v*
jobs:
super-test:
strategy:
max-parallel: 2
matrix:
python_v: ['3.09', '3.10', '']
name: Build and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
# must actually checkout for version determination
- run: git checkout ${{ github.ref_name }}
- run: uv python install ${{ matrix.python_v }}
# don't modify sync file! messes up version!
- run: uv sync --frozen --all-extras --dev
- run: uv build
- name: Reinstall from wheel
run: >
uv pip install dist/choreographer-$(uv
run --no-sync --with setuptools-git-versioning
setuptools-git-versioning)-py3-none-any.whl
- name: Test
run: uv run --no-sync poe test
timeout-minutes: 8
- name: Test (Debug)
if: runner.debug
run: uv run --no-sync poe debug-test
testpypi-publish:
name: Upload release to TestPyPI
needs: super-test
if: always() && !cancelled() && !failure()
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://pypi.org/p/logistro
# Signs this workflow so pypi trusts it
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- run: git checkout ${{ github.ref_name }}
- run: uv sync --frozen --all-extras
- run: uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1