|
1 | 1 | name: "Build Engine"
|
2 |
| -on: ["workflow_dispatch"] |
| 2 | +on: |
| 3 | + release: |
| 4 | + types: [published] |
3 | 5 | jobs:
|
4 | 6 | build-windows:
|
5 | 7 | runs-on: windows-latest
|
| 8 | + permissions: |
| 9 | + contents: write # Needed for release upload |
6 | 10 | steps:
|
7 | 11 | - name: "Checkout files"
|
8 | 12 | uses: actions/checkout@v4
|
@@ -78,22 +82,24 @@ jobs:
|
78 | 82 | --msvc-version=14.3 `
|
79 | 83 | --windows-sdk=10
|
80 | 84 |
|
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 |
87 | 90 |
|
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 |
94 | 98 |
|
95 | 99 | build-linux:
|
96 | 100 | runs-on: ubuntu-latest
|
| 101 | + permissions: |
| 102 | + contents: write # Needed for release upload |
97 | 103 | steps:
|
98 | 104 | - name: Checkout files
|
99 | 105 | uses: actions/checkout@v4
|
@@ -186,17 +192,15 @@ jobs:
|
186 | 192 | --use-toontown \
|
187 | 193 | --python-incdir="$pythonLocation/include" \
|
188 | 194 | --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" |
196 | 195 |
|
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