-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 766 Bytes
/
publish.yaml
File metadata and controls
33 lines (27 loc) · 766 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
name: Publish Package
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
name: "Publish library"
environment: publish
permissions:
id-token: write
steps:
- name: Check out
uses: actions/checkout@v6
with:
token: "${{ secrets.GITHUB_TOKEN }}"
fetch-depth: 0
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Build package
run: |
VERSION=$(uvx dunamai from any --no-metadata --style pep440).$(date +"%Y%m%d")
echo $VERSION
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version $VERSION
uv build
- name: Publish package
run: uv publish