StellarXipher/.gitea/workflows/build.yml
EthanPisani 54f54696e2
Some checks failed
Build project / Build for ${{ matrix.targetPlatform }} (StandaloneWindows64, 6000.0.37f1) (push) Has been cancelled
Build project / Build for ${{ matrix.targetPlatform }} (StandaloneLinux64, 6000.0.37f1) (push) Has been cancelled
remove upload artifact
2025-02-19 12:36:40 -05:00

86 lines
2.8 KiB
YAML

name: Build project
on: [push, pull_request]
jobs:
buildForAllSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }}
# runs-on: ubuntu-22.04-large
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-test-runner@v4
# id: testRunner
# env:
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
# UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
# UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
# with:
# unityVersion: ${{ matrix.unityVersion }}
# githubToken: ${{ secrets.GITHUB_TOKEN }}
# - uses: actions/upload-artifact@v3
# if: always()
# with:
# name: Test results (all modes)
# path: ${{ steps.testRunner.outputs.artifactsPath }}
# - if: matrix.targetPlatform == 'Android'
# uses: jlumbroso/free-disk-space@v1.2.0
- 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 }}
# customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue'
- name: Zip build artifacts
run: |
mkdir -p zipped_builds
zip -r zipped_builds/build_${{ matrix.targetPlatform }}.zip build/${{ matrix.targetPlatform }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: zipped_builds/build_${{ matrix.targetPlatform }}.zip
asset_name: build_${{ matrix.targetPlatform }}.zip
asset_content_type: application/zip