-
Notifications
You must be signed in to change notification settings - Fork 1
28 lines (28 loc) · 891 Bytes
/
Copy pathpython-publish.yaml
File metadata and controls
28 lines (28 loc) · 891 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
name: Build and publish
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
permissions:
id-token: write
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mvlogics/${{github.event.release.name}}
steps:
- run: |
NAME="${{github.event.release.name}}"
if [[ ! $NAME =~ ^[0-9]+\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])$ ]]; then
echo "Release name '$NAME' does not match the expected format 'X.Y.Z' where Y and Z are between 0 and 255"
exit 1
fi
- uses: actions/checkout@v7.0.1
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9
with:
cache-python: true
enable-cache: true
python-version: 3.14
- run: uv build
- run: uv publish