Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/actions/nugetforunity-restore/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: NuGetForUnity Restore
description: Install NuGetForUnity.Cli and restore NuGet packages for Unity

inputs:
working-directory:
description: Path to the Unity project root
required: false
default: .

runs:
using: composite
steps:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- run: dotnet tool install --global NuGetForUnity.Cli
shell: bash

- run: nugetforunity restore
working-directory: ${{ inputs.working-directory }}
shell: bash
4 changes: 4 additions & 0 deletions .github/workflows/release-upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ jobs:
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-

- uses: ./.github/actions/nugetforunity-restore
with:
working-directory: .

# Build the Unity project.
- uses: game-ci/unity-builder@v4
env:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test-and-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ jobs:
- name: Checkout project
uses: actions/checkout@v5

- uses: ./.github/actions/nugetforunity-restore
with:
working-directory: .

- name: Run Unity Tests
uses: game-ci/unity-test-runner@v4
env:
Expand Down Expand Up @@ -73,6 +77,10 @@ jobs:
key: Library-${{ matrix.targetPlatform }}
restore-keys: Library-

- uses: ./.github/actions/nugetforunity-restore
with:
working-directory: .

# Build project.
- uses: game-ci/unity-builder@v4
env:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,6 @@ InitTestScene*.unity*

# Auto-generated scenes by play mode tests
/[Aa]ssets/[Ii]nit[Tt]est[Ss]cene*.unity*

/[Aa]ssets/Packages
/[Aa]ssets/Packages.meta
Loading