-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (34 loc) · 928 Bytes
/
Copy pathdeploy.yml
File metadata and controls
39 lines (34 loc) · 928 Bytes
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
name: PyPi deployment
on:
push:
tags: ['*']
permissions:
contents: read
jobs:
deploy:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: astral-sh/setup-uv@v5
with:
enable-cache: false
- name: Build
run: uv build
- name: Build
run: uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
make_latest: ${{ !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') }}
generate_release_notes: true
files: dist/*