StellarXipher/.gitea/workflows/build.yml
EthanPisani 117a0b9482
Some checks failed
Build project / Build for ${{ matrix.targetPlatform }} (StandaloneLinux64, 6000.0.37f1) (push) Failing after 28m4s
Build project / Build for ${{ matrix.targetPlatform }} (StandaloneWindows64, 6000.0.37f1) (push) Failing after 21m44s
update with gitea release action
2025-02-19 14:14:44 -05:00

79 lines
2.7 KiB
YAML

name: Build project
on:
push:
branches:
- '**' # Run on pushes to any branch
tags-ignore:
- '**' # Ignore pushes to tags
pull_request:
branches:
- '**' # Run on pull requests to any branch
jobs:
buildForAllSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }}
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/**"
cd ../..
else
zip -r /tmp/zipped_builds/build_${{ matrix.targetPlatform }}.zip build/${{ matrix.targetPlatform }}
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: '--experimental-fetch' # Required for Node.js < 18
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} # Gitea token for authentication
with:
server_url: ${{ github.server_url }} # Gitea server URL (defaults to GitHub's server URL)
tag_name: ${{ github.sha }} # Use the commit SHA as the tag name
name: Release ${{ github.sha }} # Release name
draft: false # Do not create a draft release
prerelease: false # Do not mark as a prerelease
files: |
/tmp/zipped_builds/build_${{ matrix.targetPlatform }}.zip
md5sum: true # Generate and upload MD5 checksums
sha256sum: true # Generate and upload SHA-256 checksums