Skip to content

Commit 5be19ff

Browse files
authored
use uv publish --trusted-publishing, remove twine check (#334)
1 parent 188f5e9 commit 5be19ff

1 file changed

Lines changed: 81 additions & 79 deletions

File tree

.github/workflows/ci.yml

Lines changed: 81 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
55
branches:
66
- main
77
tags:
8-
- '**'
8+
- "**"
99
pull_request: {}
1010

1111
env:
1212
COLUMNS: 120
1313
UV_PYTHON: 3.12
14-
UV_FROZEN: '1'
14+
UV_FROZEN: "1"
1515

1616
jobs:
1717
test:
@@ -20,20 +20,20 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
os: [ubuntu, macos, windows]
23-
rust-version: [stable, '1.72']
23+
rust-version: [stable, "1.72"]
2424
python-version:
25-
- '3.9'
26-
- '3.10'
27-
- '3.11'
28-
- '3.12'
29-
- '3.13'
30-
- '3.13t'
31-
- 'pypy3.9'
32-
- 'pypy3.10'
25+
- "3.9"
26+
- "3.10"
27+
- "3.11"
28+
- "3.12"
29+
- "3.13"
30+
- "3.13t"
31+
- "pypy3.9"
32+
- "pypy3.10"
3333
exclude:
34-
- rust-version: '1.72'
34+
- rust-version: "1.72"
3535
os: macos
36-
- rust-version: '1.72'
36+
- rust-version: "1.72"
3737
os: windows
3838

3939
runs-on: ${{ matrix.os }}-latest
@@ -44,89 +44,89 @@ jobs:
4444
OS: ${{ matrix.os }}
4545

4646
steps:
47-
- uses: actions/checkout@v4
47+
- uses: actions/checkout@v4
4848

49-
- uses: astral-sh/setup-uv@v5
50-
with:
51-
enable-cache: true
49+
- uses: astral-sh/setup-uv@v5
50+
with:
51+
enable-cache: true
5252

53-
- name: install rust
54-
uses: actions-rs/toolchain@v1
55-
with:
56-
profile: minimal
57-
toolchain: ${{ matrix.rust-version }}
58-
override: true
53+
- name: install rust
54+
uses: actions-rs/toolchain@v1
55+
with:
56+
profile: minimal
57+
toolchain: ${{ matrix.rust-version }}
58+
override: true
5959

60-
- name: cache rust
61-
uses: Swatinem/rust-cache@v1
60+
- name: cache rust
61+
uses: Swatinem/rust-cache@v1
6262

63-
- if: matrix.os == 'ubuntu'
64-
run: |
65-
mkdir -p ${{ github.workspace }}/protected
66-
touch ${{ github.workspace }}/protected/test
67-
sudo chown -R root:root ${{ github.workspace }}/protected
68-
sudo chmod 700 ${{ github.workspace }}/protected
63+
- if: matrix.os == 'ubuntu'
64+
run: |
65+
mkdir -p ${{ github.workspace }}/protected
66+
touch ${{ github.workspace }}/protected/test
67+
sudo chown -R root:root ${{ github.workspace }}/protected
68+
sudo chmod 700 ${{ github.workspace }}/protected
6969
70-
- run: uv run python -c 'import sys; print("free threading enable:", hasattr(sys, "_is_gil_enabled") and not sys._is_gil_enabled())'
70+
- run: uv run python -c 'import sys; print("free threading enable:", hasattr(sys, "_is_gil_enabled") and not sys._is_gil_enabled())'
7171

72-
- run: make test
73-
env:
74-
WATCHFILES_TEST_PERMISSION_DENIED_PATH: ${{ github.workspace }}/protected
72+
- run: make test
73+
env:
74+
WATCHFILES_TEST_PERMISSION_DENIED_PATH: ${{ github.workspace }}/protected
7575

76-
- run: uv run coverage xml
76+
- run: uv run coverage xml
7777

78-
- uses: codecov/codecov-action@v1.0.13
79-
with:
80-
file: ./coverage.xml
81-
env_vars: UV_PYTHON,RUST,OS
78+
- uses: codecov/codecov-action@v1.0.13
79+
with:
80+
file: ./coverage.xml
81+
env_vars: UV_PYTHON,RUST,OS
8282

8383
lint:
8484
runs-on: ubuntu-latest
8585

8686
steps:
87-
- uses: actions/checkout@v4
87+
- uses: actions/checkout@v4
8888

89-
- uses: astral-sh/setup-uv@v5
90-
with:
91-
enable-cache: true
89+
- uses: astral-sh/setup-uv@v5
90+
with:
91+
enable-cache: true
9292

93-
- name: install rust
94-
uses: actions-rs/toolchain@v1
95-
with:
96-
profile: minimal
97-
toolchain: stable
98-
override: true
99-
components: rustfmt, clippy
93+
- name: install rust
94+
uses: actions-rs/toolchain@v1
95+
with:
96+
profile: minimal
97+
toolchain: stable
98+
override: true
99+
components: rustfmt, clippy
100100

101-
- name: cache rust
102-
uses: Swatinem/rust-cache@v1
101+
- name: cache rust
102+
uses: Swatinem/rust-cache@v1
103103

104-
- run: uv sync --group lint
104+
- run: uv sync --group lint
105105

106-
- uses: pre-commit/action@v3.0.0
107-
with:
108-
extra_args: --all-files --verbose
109-
env:
110-
SKIP: no-commit-to-branch
106+
- uses: pre-commit/action@v3.0.0
107+
with:
108+
extra_args: --all-files --verbose
109+
env:
110+
SKIP: no-commit-to-branch
111111

112112
docs:
113113
runs-on: ubuntu-latest
114114
steps:
115-
- uses: actions/checkout@v4
115+
- uses: actions/checkout@v4
116116

117-
- uses: astral-sh/setup-uv@v5
118-
with:
119-
enable-cache: true
117+
- uses: astral-sh/setup-uv@v5
118+
with:
119+
enable-cache: true
120120

121-
- run: uv sync --group docs
121+
- run: uv sync --group docs
122122

123-
- run: make docs
123+
- run: make docs
124124

125-
- name: store docs site
126-
uses: actions/upload-artifact@v4
127-
with:
128-
name: docs
129-
path: site
125+
- name: store docs site
126+
uses: actions/upload-artifact@v4
127+
with:
128+
name: docs
129+
path: site
130130

131131
build:
132132
name: >
@@ -189,7 +189,7 @@ jobs:
189189
- name: set up python
190190
uses: actions/setup-python@v5
191191
with:
192-
python-version: '3.11'
192+
python-version: "3.11"
193193
architecture: ${{ matrix.python-architecture || 'x64' }}
194194

195195
- name: check GITHUB_REF matches package version
@@ -246,14 +246,14 @@ jobs:
246246

247247
- name: list dist files
248248
run: |
249-
ls -lh dist/
250-
echo "`ls dist | wc -l` files"
249+
ls -lh dist/
250+
echo "`ls dist | wc -l` files"
251251
252252
- name: extract and list sdist file
253253
run: |
254-
mkdir sdist-files
255-
tar -xvf dist/*.tar.gz -C sdist-files
256-
tree -a sdist-files
254+
mkdir sdist-files
255+
tar -xvf dist/*.tar.gz -C sdist-files
256+
tree -a sdist-files
257257
258258
- name: extract and list wheel file
259259
run: ls dist/*cp312-manylinux_2_17_x86_64*.whl | head -n 1
@@ -285,6 +285,10 @@ jobs:
285285
steps:
286286
- uses: actions/checkout@v4
287287

288+
- uses: astral-sh/setup-uv@v5
289+
with:
290+
enable-cache: true
291+
288292
- name: get dist artifacts
289293
uses: actions/download-artifact@v4
290294
with:
@@ -299,9 +303,7 @@ jobs:
299303
path: site
300304

301305
- name: Publish to PyPI
302-
uses: pypa/gh-action-pypi-publish@v1.12.3
303-
with:
304-
skip-existing: true
306+
run: "uv publish --trusted-publishing dist/*"
305307

306308
- name: publish docs
307309
uses: JamesIves/github-pages-deploy-action@v4.7.2

0 commit comments

Comments
 (0)