StellarXipher/.gitea/workflows/build.yml
EthanPisani acd21e3458
Some checks failed
Build project / Build for ${{ matrix.targetPlatform }} (${{ matrix.unityVersion }}) (StandaloneLinux64, 6000.0.37f1) (push) Successful in 5m27s
Build project / Build for ${{ matrix.targetPlatform }} (${{ matrix.unityVersion }}) (StandaloneWindows64, 6000.0.37f1) (push) Failing after 19m13s
Fix action name and windows zip
2025-02-19 16:23:55 -05:00

84 lines
2.6 KiB
YAML

name: Build project
on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
branches:
- '**'
jobs:
buildForAllSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }} (${{ matrix.unityVersion }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
unityVersion:
- 6000.0.37f1
targetPlatform:
- StandaloneWindows64 # Windows 64-bit standalone
- StandaloneLinux64 # Linux 64-bit standalone
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v4
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
- uses: https://github.com/game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
DOCKER_DEFAULT_PLATFORM: linux/amd64
with:
runAsHostUser: true
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
- name: Zip build artifacts
run: |
mkdir -p /tmp/zipped_builds
if [ "${{ matrix.targetPlatform }}" == "StandaloneLinux64" ]; then
cd build/StandaloneLinux64
zip -r /tmp/zipped_builds/build_StandaloneLinux64.zip . \
-x "StandaloneLinux64_BackUpThisFolder_ButDontShipItWithYourGame/**" \
-x "StellarXipher_BurstDebugInformation_DoNotShip/**"
cd ../..
elif [ "${{ matrix.targetPlatform }}" == "StandaloneWindows64" ]; then
cd build/StandaloneWindows64
zip -r /tmp/zipped_builds/build_StandaloneWindows64.zip . \
-x "StellarXipher_BurstDebugInformation_DoNotShip/**"
cd ../..
fi
- name: Debug - List files in /tmp/zipped_builds
run: |
ls -R /tmp/zipped_builds
- name: Create Gitea Release and Upload Assets
uses: akkuman/gitea-release-action@v1
env:
NODE_OPTIONS: '--max-old-space-size=4096'
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
with:
server_url: ${{ github.server_url }}
tag_name: ${{ github.sha }}
name: Release ${{ github.sha }}
draft: false
prerelease: false
files: |
/tmp/zipped_builds/build_${{ matrix.targetPlatform }}.zip
md5sum: true
sha256sum: true