-
Notifications
You must be signed in to change notification settings - Fork 8
76 lines (70 loc) · 1.86 KB
/
Copy pathrelease.yml
File metadata and controls
76 lines (70 loc) · 1.86 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
python-version: ['3.13']
group: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@v5
- name: Run tests with Python ${{ matrix.python-version }} on ${{ matrix.os }}
env:
PYTEST_GROUP: ${{ matrix.group }}
run: |
pip install tox==4.23.2
uv run tox -e py_partial
getrelease:
name: Get release
needs: test
runs-on: ubuntu-24.04
outputs:
versionoutput: ${{ steps.getversiontag.outputs.VERSION }}
steps:
- name: Get the tag version
id: getversiontag
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
build:
name: Build packages
needs: getrelease
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-24.04
TARGET: ubuntu
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Release
id: release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: true
upload:
name: Upload to PyPI
needs: [build]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
architecture: x64
- uses: astral-sh/setup-uv@v5
- name: Build package
run: uv build --no-sources
- name: Upload to PyPI
run: uv publish --token=${{ secrets.PYPI_TOKEN }}