-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 998 Bytes
/
release.yml
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
name: Upload to PyPI
on:
push:
tags:
- "*"
env:
FORCE_COLOR: "1"
jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
environment: release
steps:
- uses: actions/checkout@v3
- name: Check prerelease
id: check_version
run: |
if [[ "${{ github.ref }}" =~ ^refs/tags/[0-9.]+$ ]]; then
echo "PRERELEASE=false" >> $GITHUB_OUTPUT
else
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
fi
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Build artifacts
run: |
python -m pip install build
python -m build
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
- name: Test Build
run: |
python -m pip install dist/*.whl
lxm3 version
- name: Publish package distributions to PyPI
run: pdm publish --no-build