Skip to content

Commit 9d58f44

Browse files
committed
update ci
1 parent 8bd04af commit 9d58f44

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: ci
22
on:
33
push:
44
branches: [ master ]
5-
tags:
6-
- 'v*'
7-
pull_request:
8-
branches: [ master ]
95
jobs:
106
test:
117
strategy:
@@ -42,28 +38,4 @@ jobs:
4238
env:
4339
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4440
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }}
45-
run: uv run pytest -vv --exitfirst
46-
publish:
47-
needs: test
48-
if: startsWith(github.ref, 'refs/tags/v')
49-
runs-on: ubuntu-latest
50-
steps:
51-
- uses: actions/checkout@v2
52-
- name: Set up Python
53-
uses: actions/setup-python@v2
54-
with:
55-
python-version: 3.9
56-
- name: Install uv
57-
uses: astral-sh/setup-uv@v6
58-
with:
59-
python-version: 3.9
60-
version: '0.8.8'
61-
- name: Install dependencies
62-
run: uv sync
63-
- name: Build package
64-
run: uv build
65-
- name: Publish package
66-
uses: pypa/gh-action-pypi-publish@release/v1
67-
with:
68-
user: __token__
69-
password: ${{ secrets.PYPI_API_TOKEN }}
41+
run: uv run pytest -vv --exitfirst

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: publish
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags:
6+
- 'v*'
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Set up Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: '3.9'
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v6
18+
with:
19+
python-version: '3.9'
20+
version: '0.8.8'
21+
- name: Install dependencies
22+
run: uv sync
23+
- name: Build package
24+
run: uv build
25+
- name: Publish package
26+
uses: pypa/gh-action-pypi-publish@release/v1
27+
with:
28+
user: __token__
29+
password: ${{ secrets.PYPI_API_TOKEN }}
30+

0 commit comments

Comments
 (0)