Merge pull request #791 from FunkinCrew/actions-manual-output

Allow for manual configuration + artifact saving for Github Actions
This commit is contained in:
Cameron Taylor 2024-09-25 19:24:14 -04:00 committed by GitHub
commit e1aa25a249
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,15 @@ name: Build and Upload nightly game builds
on: on:
workflow_dispatch: 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: push:
paths-ignore: paths-ignore:
- '**/Dockerfile' - '**/Dockerfile'
@ -53,13 +62,20 @@ jobs:
- name: Build game - name: Build game
if: ${{ matrix.target == 'windows' }} if: ${{ matrix.target == 'windows' }}
run: | 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 timeout-minutes: 120
- name: Build game - name: Build game
if: ${{ matrix.target != 'windows' }} if: ${{ matrix.target != 'windows' }}
run: | 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 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 - name: Upload build artifacts
uses: ./.github/actions/upload-itch uses: ./.github/actions/upload-itch
@ -125,9 +141,15 @@ jobs:
- name: Build game - name: Build game
run: | 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 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 - name: Upload build artifacts
uses: ./.github/actions/upload-itch uses: ./.github/actions/upload-itch
with: with: