mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-04-28 20:58:07 +03:00
build: build every pull request
This commit is contained in:
parent
5b2460c484
commit
3ef5a77a20
4 changed files with 79 additions and 32 deletions
44
.github/workflows/build_game.yml
vendored
Normal file
44
.github/workflows/build_game.yml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
name: Build the game and the installer
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build release assets
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux
|
||||
just_target: package-linux
|
||||
- platform: win
|
||||
just_target: package-win-all
|
||||
- platform: win-installer
|
||||
just_target: package-win-installer
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
uses: taiki-e/install-action@just
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'true'
|
||||
fetch-depth: 0
|
||||
|
||||
- id: vars
|
||||
name: Prepare variables
|
||||
run: echo "version=$(just output-current-version)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Package asset (${{ matrix.platform }})
|
||||
run: just ${{ matrix.just_target }}
|
||||
|
||||
- name: Upload the artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.event.repository.name }}-${{ steps.vars.outputs.version }}-${{ matrix.platform }}
|
||||
path: |
|
||||
*.zip
|
||||
*.exe
|
|
@ -1,4 +1,4 @@
|
|||
name: Build macOS app bundle and .dmg installer image
|
||||
name: Build the game and the installer (macOS)
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
@ -19,6 +19,7 @@ env:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
name: Build release assets
|
||||
runs-on: macos-14
|
||||
continue-on-error: ${{ inputs.let_mac_fail == true || inputs.let_mac_fail == 'true' }}
|
||||
steps:
|
||||
|
@ -264,10 +265,14 @@ jobs:
|
|||
xcrun stapler staple -v TR1X-Installer.dmg
|
||||
mv TR1X-Installer.dmg "TR1X-$(tools/get_version)-Installer.dmg"
|
||||
|
||||
- id: vars
|
||||
name: Prepare variables
|
||||
run: echo "version=$(tools/get_version)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload signed+notarized installer image
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: packaged_asset-mac
|
||||
name: ${{ github.event.repository.name }}-${{ steps.vars.outputs.version }}-mac
|
||||
path: |
|
||||
*.dmg
|
||||
compression-level: 0 # .dmg is already compressed.
|
25
.github/workflows/pr_builds.yml
vendored
Normal file
25
.github/workflows/pr_builds.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: Create a test build
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- '!stable'
|
||||
- '!develop'
|
||||
|
||||
jobs:
|
||||
package_multiplatform:
|
||||
name: 'Create a test build'
|
||||
uses: ./.github/workflows/build_game.yml
|
||||
secrets: inherit
|
||||
|
||||
package_mac:
|
||||
name: 'Create a test build (macOS)'
|
||||
if: vars.MACOS_ENABLE == 'true'
|
||||
uses: ./.github/workflows/build_game_macos.yml
|
||||
with:
|
||||
let_mac_fail: true
|
||||
secrets: inherit
|
33
.github/workflows/release.yml
vendored
33
.github/workflows/release.yml
vendored
|
@ -65,42 +65,15 @@ jobs:
|
|||
name: Build release assets
|
||||
runs-on: ubuntu-latest
|
||||
if: vars.RELEASE_ENABLE == 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux
|
||||
just_target: package-linux
|
||||
- platform: win
|
||||
just_target: package-win-all
|
||||
- platform: win installer
|
||||
just_target: package-win-installer
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
uses: taiki-e/install-action@just
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'true'
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Package asset (${{ matrix.platform }})
|
||||
run: just ${{ matrix.just_target }}
|
||||
|
||||
- name: Upload the artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: packaged_asset-${{ matrix.platform }}
|
||||
path: |
|
||||
*.zip
|
||||
*.exe
|
||||
uses: ./.github/workflows/build_game.yml
|
||||
secrets: inherit
|
||||
|
||||
package_mac:
|
||||
name: "Build release assets (mac)"
|
||||
if: |
|
||||
vars.RELEASE_ENABLE == 'true' &&
|
||||
vars.MACOS_ENABLE == 'true'
|
||||
uses: ./.github/workflows/build_macos.yml
|
||||
uses: ./.github/workflows/build_game_macos.yml
|
||||
with:
|
||||
let_mac_fail: ${{ inputs.let_mac_fail == true || inputs.let_mac_fail == 'true' }}
|
||||
secrets: inherit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue