From 4d94eabaccda786a34ecf7a104545b463ad0af37 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sun, 8 May 2022 19:56:48 +0100 Subject: [PATCH] [github actions] Use local build artifacts instead of package --- .github/workflows/unity.yml | 43 ++++++++++++++------ X10D.Unity.Tests/Packages/manifest.json | 1 - X10D.Unity.Tests/Packages/packages-lock.json | 7 ---- 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/.github/workflows/unity.yml b/.github/workflows/unity.yml index f646366..0216ee0 100644 --- a/.github/workflows/unity.yml +++ b/.github/workflows/unity.yml @@ -16,15 +16,34 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Unity - Test runner - uses: game-ci/unity-test-runner@v2.0.2 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - with: - projectPath: X10D.Unity.Tests - githubToken: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup .NET + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 6.0.x + + - name: Add GitHub NuGet source + run: dotnet nuget add source --username oliverbooth --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/oliverbooth/index.json" + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build -c Release + + - name: Copy artifacts to project + run: | + cp -r ./X10D/bin/Release/netstandard2.1/X10D.dll ./X10D.Unity.Tests/Assets/Libraries/X10D.dll + cp -r ./X10D.Unity/bin/Release/netstandard2.1/X10D.Unity.dll ./X10D.Unity.Tests/Assets/Libraries/X10D.Unity.dll + + - name: Unity - Test runner + uses: game-ci/unity-test-runner@v2.0.2 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + with: + projectPath: X10D.Unity.Tests + githubToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/X10D.Unity.Tests/Packages/manifest.json b/X10D.Unity.Tests/Packages/manifest.json index ef5d415..6f13d5a 100644 --- a/X10D.Unity.Tests/Packages/manifest.json +++ b/X10D.Unity.Tests/Packages/manifest.json @@ -10,7 +10,6 @@ "com.unity.timeline": "1.6.4", "com.unity.ugui": "1.0.0", "com.unity.visualscripting": "1.7.7", - "me.olivr.x10d": "https://github.com/oliverbooth/X10D.git#upm", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", "com.unity.modules.animation": "1.0.0", diff --git a/X10D.Unity.Tests/Packages/packages-lock.json b/X10D.Unity.Tests/Packages/packages-lock.json index 8a1b30d..5521691 100644 --- a/X10D.Unity.Tests/Packages/packages-lock.json +++ b/X10D.Unity.Tests/Packages/packages-lock.json @@ -146,13 +146,6 @@ }, "url": "https://packages.unity.com" }, - "me.olivr.x10d": { - "version": "https://github.com/oliverbooth/X10D.git#upm", - "depth": 0, - "source": "git", - "dependencies": {}, - "hash": "7ee14cebfd7415c8c161b03d592956151552d6b5" - }, "com.unity.modules.ai": { "version": "1.0.0", "depth": 0,