From 6d1f37acc6f0e6095a8004632e758e6d15b6423b Mon Sep 17 00:00:00 2001 From: Gabriel Le Breton Date: Thu, 8 Oct 2020 10:01:55 -0400 Subject: [PATCH] Add avanced example from https://unity-ci.com/docs/github/getting-started --- .github/workflows/main.yml | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a58fd02 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,56 @@ +name: Actions 😎 + +on: + pull_request: {} + push: { branches: [main] } + +env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + +jobs: + buildAndTestForSomePlatforms: + name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + projectPath: + - test-project + unityVersion: + - 2019.2.11f1 + targetPlatform: + - StandaloneOSX # Build a macOS standalone (Intel 64-bit). + - StandaloneWindows64 # Build a Windows 64-bit standalone. + - StandaloneLinux64 # Build a Linux 64-bit standalone. + - iOS # Build an iOS player. + - WebGL # WebGL. + steps: + - uses: actions/checkout@v2 + with: + lfs: true + - uses: actions/cache@v1.1.0 + with: + path: ${{ matrix.projectPath }}/Library + key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }} + restore-keys: | + Library-${{ matrix.projectPath }}- + Library- + - uses: webbertakken/unity-test-runner@v1.3 + id: testRunner + with: + projectPath: ${{ matrix.projectPath }} + unityVersion: ${{ matrix.unityVersion }} + - uses: actions/upload-artifact@v1 + with: + name: Test results (all modes) + path: ${{ steps.testRunner.outputs.artifactsPath }} + - uses: webbertakken/unity-builder@v0.10 + with: + projectPath: ${{ matrix.projectPath }} + unityVersion: ${{ matrix.unityVersion }} + targetPlatform: ${{ matrix.targetPlatform }} + customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue' + - uses: actions/upload-artifact@v1 + with: + name: Build + path: build \ No newline at end of file