Skip to content

Commit 8263b59

Browse files
committed
add GitHub Action to publish the wheel
1 parent bc90ac2 commit 8263b59

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches:
66
- main
77
pull_request:
8+
release:
9+
types:
10+
- created
811

912
permissions:
1013
contents: read
@@ -33,7 +36,33 @@ jobs:
3336
run: chmod +x ./gradlew
3437

3538
- name: Build and test
36-
run: ./gradlew clean build
39+
run: ./gradlew clean build buildPythonWheel
40+
- name: Upload Python wheel artifact
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: python-wheel
44+
path: "**/build/install/*/dist/*.whl"
45+
if-no-files-found: error
46+
47+
publish-wheel:
48+
name: Publish Python wheel to GitHub Release
49+
needs: build
50+
runs-on: ubuntu-latest
51+
if: github.event_name == 'release'
52+
permissions:
53+
contents: write
54+
55+
steps:
56+
- name: Download Python wheel artifact
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: python-wheel
60+
path: dist
61+
62+
- name: Publish wheel to GitHub Release
63+
uses: softprops/action-gh-release@v2
64+
with:
65+
files: dist/**/*.whl
3766

3867
dependency-submission:
3968
name: Submit Gradle dependencies

0 commit comments

Comments
 (0)