Skip to content

Commit 99c9e1b

Browse files
author
Snowy
committed
CI: Change build trigger to a release
1 parent ca408f5 commit 99c9e1b

File tree

1 file changed

+30
-26
lines changed

1 file changed

+30
-26
lines changed

.github/workflows/build.yaml

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
name: "Build Engine"
2-
on: ["workflow_dispatch"]
2+
on:
3+
release:
4+
types: [published]
35
jobs:
46
build-windows:
57
runs-on: windows-latest
8+
permissions:
9+
contents: write # Needed for release upload
610
steps:
711
- name: "Checkout files"
812
uses: actions/checkout@v4
@@ -78,22 +82,24 @@ jobs:
7882
--msvc-version=14.3 `
7983
--windows-sdk=10
8084
81-
- name: "Upload Installer"
82-
uses: actions/upload-artifact@v4
83-
with:
84-
name: "panda3d-windows-installer"
85-
path: "Panda3D-1.11.0-py3.11-x64.exe"
86-
if-no-files-found: "error"
85+
- name: Rename Panda Binaries
86+
shell: powershell
87+
run: |
88+
Rename-Item Panda3D-1.11.0-py3.11-x64.exe Panda3d-Windows-x64-${{ github.ref_name }}.exe
89+
Rename-Item panda3d-1.11.0-cp311-cp311-win_amd64.whl Panda3d-Windows-x64-${{ github.ref_name }}.whl
8790
88-
- name: "Upload Wheel"
89-
uses: actions/upload-artifact@v4
90-
with:
91-
name: "panda3d-windows-wheel"
92-
path: "panda3d-1.11.0-cp311-cp311-win_amd64.whl"
93-
if-no-files-found: "error"
91+
- name: Upload Panda Binaries
92+
shell: powershell
93+
env:
94+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95+
run: |
96+
gh release upload ${{ github.ref_name }} Panda3d-Windows-x64-${{ github.ref_name }}.exe
97+
gh release upload ${{ github.ref_name }} Panda3d-Windows-x64-${{ github.ref_name }}.whl
9498
9599
build-linux:
96100
runs-on: ubuntu-latest
101+
permissions:
102+
contents: write # Needed for release upload
97103
steps:
98104
- name: Checkout files
99105
uses: actions/checkout@v4
@@ -186,17 +192,15 @@ jobs:
186192
--use-toontown \
187193
--python-incdir="$pythonLocation/include" \
188194
--python-libdir="$pythonLocation/lib"
189-
190-
- name: "Upload Installer"
191-
uses: actions/upload-artifact@v4
192-
with:
193-
name: "panda3d-linux-installer"
194-
path: "panda3d1.11_1.11.0_amd64.deb"
195-
if-no-files-found: "error"
196195
197-
- name: "Upload Wheel"
198-
uses: actions/upload-artifact@v4
199-
with:
200-
name: "panda3d-linux-wheel"
201-
path: "panda3d-1.11.0-cp311-cp311-linux_x86_64.whl"
202-
if-no-files-found: "error"
196+
- name: Rename Panda Binaries
197+
run: |
198+
mv panda3d1.11_1.11.0_amd64.deb Panda3D-Linux-x64-${{ github.ref_name }}.deb
199+
mv panda3d-1.11.0-cp311-cp311-linux_x86_64.whl Panda3D-Linux-x64-${{ github.ref_name }}.whl
200+
201+
- name: Upload Panda Binaries
202+
env:
203+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
204+
run: |
205+
gh release upload ${{ github.ref_name }} Panda3D-Linux-x64-${{ github.ref_name }}.deb
206+
gh release upload ${{ github.ref_name }} Panda3D-Linux-x64-${{ github.ref_name }}.whl

0 commit comments

Comments
 (0)