-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (37 loc) · 1.05 KB
/
publish.yaml
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
name: Publish Package
on:
# release:
# types: [created]
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
name: "Publish library"
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Check out
uses: actions/checkout@v4
with:
token: "${{ secrets.GITHUB_TOKEN }}"
fetch-depth: 0
- name: Install python
uses: actions/setup-python@v4
id: install-python
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: yezz123/setup-uv@v4
id: install-uv
- name: Build package
run: |
uv tool install dunamai
VERSION=$(dunamai from any --no-metadata --style pep440).$(date +"%Y%m%d")
uvx --with pdm-bump pdm bump to $VERSION
uvx --from build pyproject-build --installer uv
# - name: Release to PyPI
# run: |
# uvx twine upload dist/* --non-interactive \
# --username __token__ --password ${{ secrets.PYPI_API_TOKEN }}