diff --git a/.gitea/workflows/build-game.yaml b/.gitea/workflows/build-game.yaml index 9c1cf50..5853433 100644 --- a/.gitea/workflows/build-game.yaml +++ b/.gitea/workflows/build-game.yaml @@ -94,4 +94,32 @@ jobs: uses: actions/upload-artifact@v3 with: name: game-clients - path: build/ \ No newline at end of file + path: build/ + + - name: Publish Nightly Build + env: + # Config + PACKAGE_NAME: my-game-windows + # We overwrite the 'nightly' version every time so the URL stays the same + VERSION: nightly + ZIP_NAME: game-windows-nightly.zip + + # Auth + API_URL: https://gitea.212.63.210.91.nip.io/api/packages/${{ gitea.repository_owner }}/generic + TOKEN: ${{ secrets.USER_PACKAGE_PASSWORD }} + run: | + echo "Packaging Game..." + cd build/windows + + # Zip everything (Executable + PCK + potential .dlls) + zip -r ../../$ZIP_NAME . + cd ../.. + + echo "Uploading Nightly..." + # PUT request replaces the file if it exists + curl --fail --user "${{ gitea.actor }}:$TOKEN" \ + --upload-file "$ZIP_NAME" \ + "$API_URL/$PACKAGE_NAME/$VERSION/$ZIP_NAME" + + echo "✅ Nightly Build Available at:" + echo "$API_URL/$PACKAGE_NAME/$VERSION/$ZIP_NAME" \ No newline at end of file