-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (31 loc) · 882 Bytes
/
build_wheel.yml
File metadata and controls
32 lines (31 loc) · 882 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
name: Build Wheel for Release
on:
push:
paths:
- 'src/*'
- 'pyproject.toml'
branches:
- main
jobs:
build_wheel:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.11
- name: Build Wheel
run: |
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade build
python -m build
- name: Create New Release and Upload Wheel
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(python -c 'import tomllib; print("v"+tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')
gh release create $VERSION ./dist/* --generate-notes --title $VERSION