Skip to content

Commit 06c8b45

Browse files
Create python-package-conda.yml
implement automated build of the wheel and uploading it as release artefact.
1 parent 7d1a439 commit 06c8b45

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build and Release Wheel
2+
3+
on:
4+
push:
5+
tags:
6+
- '**' # Trigger on tags like v1.0.0, v2.1.3, etc.
7+
8+
jobs:
9+
build-and-release:
10+
name: Build Wheel and Create Release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0 # Needed for setuptools_scm to determine version from git tags
18+
19+
- name: Set up Python 3.12
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.12'
23+
24+
- name: Install build dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install build setuptools setuptools_scm wheel pytest-runner
28+
29+
- name: Build wheel
30+
run: |
31+
python -m build --wheel
32+
33+
- name: Create GitHub Release
34+
uses: softprops/action-gh-release@v2
35+
with:
36+
files: dist/*.whl
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)