From 4939b09fb0d7b404a1c8573305ac76c5d7f5fba6 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 17 Sep 2024 04:43:34 -0400 Subject: [PATCH 1/2] manual build artifacts --- .github/workflows/build-game.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index dff9a369d..524bd1b32 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -2,6 +2,15 @@ name: Build and Upload nightly game builds on: workflow_dispatch: + inputs: + build-defines: + type: string + description: Build defines to use + default: '-DGITHUB_BUILD' + save-artifact: + type: boolean + description: Save the build artifact to Github Actions (sends to itch otherwise) + default: false push: paths-ignore: - '**/Dockerfile' @@ -53,13 +62,20 @@ jobs: - name: Build game if: ${{ matrix.target == 'windows' }} run: | - haxelib run lime build windows -v -release -DGITHUB_BUILD + haxelib run lime build windows -v -release ${{ github.event.inputs.build-defines }} timeout-minutes: 120 - name: Build game if: ${{ matrix.target != 'windows' }} run: | - haxelib run lime build ${{ matrix.target }} -v -release --times -DGITHUB_BUILD + haxelib run lime build ${{ matrix.target }} -v -release --times ${{ github.event.inputs.build-defines }} timeout-minutes: 120 + - name: Save build artifact to Github Actions + if: ${{ github.event.inputs.save-artifact }} + uses: actions/upload-artifact@v4 + with: + name: build-${{ matrix.target }} + path: export/release/${{matrix.target}}/bin/ + - name: Upload build artifacts uses: ./.github/actions/upload-itch @@ -125,7 +141,7 @@ jobs: - name: Build game run: | - haxelib run lime build ${{ matrix.target }} -v -release --times -DGITHUB_BUILD + haxelib run lime build ${{ matrix.target }} -v -release --times ${{ github.event.inputs.build-defines }} timeout-minutes: 120 - name: Upload build artifacts From 7fbbc5cf95f047cd2aec46087dcf2d555d45b9d9 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 17 Sep 2024 04:48:30 -0400 Subject: [PATCH 2/2] save artifacts on html5 and linux? --- .github/workflows/build-game.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-game.yml b/.github/workflows/build-game.yml index 524bd1b32..5eb13081d 100644 --- a/.github/workflows/build-game.yml +++ b/.github/workflows/build-game.yml @@ -144,6 +144,12 @@ jobs: haxelib run lime build ${{ matrix.target }} -v -release --times ${{ github.event.inputs.build-defines }} timeout-minutes: 120 + - name: Save build artifact to Github Actions + if: ${{ github.event.inputs.save-artifact }} + uses: actions/upload-artifact@v4 + with: + name: build-${{ matrix.target }} + path: export/release/${{matrix.target}}/bin/ - name: Upload build artifacts uses: ./.github/actions/upload-itch with: