|
42 | 42 | - name: Prepare package
|
43 | 43 | run: |
|
44 | 44 | wasm-bindgen --no-typescript --out-name bevy_game --out-dir wasm --target web target/wasm32-unknown-unknown/release/${{ env.binary }}.wasm
|
45 |
| - cp -r assets wasm/ |
| 45 | + cp -r assets wasm/ || true # Try to copy, but ignore if it can't copy if source directory does not exist |
46 | 46 |
|
47 | 47 | - name: Package as a zip
|
48 | 48 | working-directory: ./wasm
|
|
91 | 91 | run: |
|
92 | 92 | mkdir linux
|
93 | 93 | cp target/x86_64-unknown-linux-gnu/release/${{ env.binary }} linux/
|
94 |
| - cp -r assets linux/ |
| 94 | + cp -r assets linux/ || true # Try to copy, but ignore if it can't copy if source directory does not exist |
95 | 95 |
|
96 | 96 | - name: Package as a zip
|
97 | 97 | working-directory: ./linux
|
@@ -137,6 +137,7 @@ jobs:
|
137 | 137 | run: |
|
138 | 138 | mkdir windows
|
139 | 139 | cp target/x86_64-pc-windows-msvc/release/${{ env.binary }}.exe windows/
|
| 140 | + mkdir assets -ea 0 # create the assets directory if it does not exist, it will get ignored in the zip if empty |
140 | 141 | cp -r assets windows/
|
141 | 142 |
|
142 | 143 | - name: Package as a zip
|
@@ -186,7 +187,7 @@ jobs:
|
186 | 187 | run: |
|
187 | 188 | mkdir -p ${{ env.binary }}.app/Contents/MacOS
|
188 | 189 | cp target/x86_64-apple-darwin/release/${{ env.binary }} ${{ env.binary }}.app/Contents/MacOS/
|
189 |
| - cp -r assets ${{ env.binary }}.app/Contents/MacOS/ |
| 190 | + cp -r assets ${{ env.binary }}.app/Contents/MacOS/ || true # Try to copy, but ignore if it can't copy if source directory does not exist |
190 | 191 | hdiutil create -fs HFS+ -volname "${{ env.binary }}" -srcfolder ${{ env.binary }}.app ${{ env.binary }}-macOS-intel.dmg
|
191 | 192 |
|
192 | 193 | - name: Upload binaries to artifacts
|
@@ -232,7 +233,7 @@ jobs:
|
232 | 233 | run: |
|
233 | 234 | mkdir -p ${{ env.binary }}.app/Contents/MacOS
|
234 | 235 | cp target/aarch64-apple-darwin/release/${{ env.binary }} ${{ env.binary }}.app/Contents/MacOS/
|
235 |
| - cp -r assets ${{ env.binary }}.app/Contents/MacOS/ |
| 236 | + cp -r assets ${{ env.binary }}.app/Contents/MacOS/ || true # Try to copy, but ignore if it can't copy if source directory does not exist |
236 | 237 | hdiutil create -fs HFS+ -volname "${{ env.binary }}-macOS-apple-silicon" -srcfolder ${{ env.binary }}.app ${{ env.binary }}-macOS-apple-silicon.dmg
|
237 | 238 |
|
238 | 239 | - name: Upload binaries to artifacts
|
|
0 commit comments