99 - v*
1010 pull_request :
1111
12+ env :
13+ UV_SYSTEM_PYTHON : 1
14+
1215jobs :
13- metadata_please-just-tests :
16+ test :
1417 runs-on : ${{ matrix.os }}
1518 strategy :
1619 fail-fast : false
1720 matrix :
1821 python-version : ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1922 os : [macOS-latest, ubuntu-latest, windows-latest]
2023 exclude :
21- # macOS-latest are now on arm64
22- - os : macOS-latest
23- python-version : " 3.7 "
24+ # no amd64 3.7
25+ - python-version : " 3.7 "
26+ os : macOS-latest
2427
2528 steps :
2629 - name : Checkout
@@ -29,35 +32,46 @@ jobs:
2932 uses : actions/setup-python@v5
3033 with :
3134 python-version : ${{ matrix.python-version }}
32- allow-prereleases : true
35+ - uses : astral-sh/setup-uv@v3
3336 - name : Install
3437 run : |
35- python -m pip install --upgrade pip
36- pip install -U .
38+ uv pip install -e .[test]
3739 - name : Test
38- run : python -m metadata_please.tests
39-
40- metadata_please :
41- runs-on : ${{ matrix.os }}
42- strategy :
43- fail-fast : false
44- matrix :
45- python-version : ["3.10", "3.11", "3.12"]
46- os : [macOS-latest, ubuntu-latest, windows-latest]
40+ run : make test
41+ - name : Lint
42+ run : |
43+ uv pip install -e .[test,dev]
44+ make lint
45+ if : ${{ matrix.python-version != '3.9' && matrix.python-version != '3.8' && matrix.python-version != '3.7' }}
4746
47+ build :
48+ needs : test
49+ runs-on : ubuntu-latest
4850 steps :
49- - name : Checkout
50- uses : actions/checkout@v4
51- - name : Set Up Python ${{ matrix.python-version }}
52- uses : actions/setup-python@v5
51+ - uses : actions/checkout@v4
52+ - uses : actions/setup-python@v5
5353 with :
54- python-version : ${{ matrix.python-version }}
54+ python-version : " 3.12"
55+ - uses : astral-sh/setup-uv@v3
5556 - name : Install
56- run : |
57- python -m pip install --upgrade pip
58- make setup
59- pip install -U .
60- - name : Test
61- run : make test
62- - name : Lint
63- run : make lint
57+ run : uv pip install build
58+ - name : Build
59+ run : python -m build
60+ - name : Upload
61+ uses : actions/upload-artifact@v3
62+ with :
63+ name : sdist
64+ path : dist
65+
66+ publish :
67+ needs : build
68+ runs-on : ubuntu-latest
69+ if : startsWith(github.ref, 'refs/tags/v')
70+ permissions :
71+ id-token : write
72+ steps :
73+ - uses : actions/download-artifact@v3
74+ with :
75+ name : sdist
76+ path : dist
77+ - uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments