Skip to content

Commit a8ff9ef

Browse files
committed
update gh action
1 parent 7c909e1 commit a8ff9ef

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

.github/workflows/build-publish.yml

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,33 @@ name: build and publish
22

33
on:
44
release:
5-
types: [created]
5+
types:
6+
- published
7+
workflow_dispatch:
68

79
jobs:
8-
build:
10+
deploy:
911
runs-on: ubuntu-latest
1012
steps:
11-
- uses: actions/checkout@v3
12-
- name: Build and publish to pypi
13-
uses: JRubics/[email protected]
13+
- uses: actions/checkout@v4
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v3
17+
with:
18+
enable-cache: true
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
1422
with:
15-
poetry_version: "==1.8.2"
16-
pypi_token: ${{ secrets.PYPI_API_TOKEN_FASTMETEO }}
23+
python-version: "3.11"
24+
25+
- name: Build packages
26+
run: |
27+
uvx --with hatch-vcs hatchling build
28+
29+
- name: Publish a Python distribution to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1
31+
with:
32+
user: __token__
33+
password: ${{ secrets.PYPI_API_TOKEN_FASTMETEO }}
34+

0 commit comments

Comments
 (0)