forked from electronmicroscopy/quantem
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.27 KB
/
Copy pathdeploy.yml
File metadata and controls
57 lines (46 loc) · 1.27 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: PyPi deployment
on:
push:
branches:
- main
permissions:
contents: write
jobs:
uv-deploy:
name: deploy
runs-on: ubuntu-latest
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Verify lock file is up to date
run: uv lock --check
- name: Read version
id: version
run: |
VERSION=$(uv version --short)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Build the project
run: uv build
- name: Create Git tag
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git tag v${{ steps.version.outputs.version }}
git push origin v${{ steps.version.outputs.version }}
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.version }}
name: v${{ steps.version.outputs.version }}
generate_release_notes: true
files: |
dist/*
- name: Publish to PyPi
run: uv publish