Skip to content

Commit

Permalink
unity setup action
Browse files Browse the repository at this point in the history
  • Loading branch information
drewcassidy committed Sep 13, 2024
1 parent fb62004 commit 59ee194
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/actions/setup-unity/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Setup Unity
description: Installs the Unity Editor

inputs:
editor-version:
description: >
CKAN tag to install. set to an empty string to always install the most recent version.
See https://github.com/KSP-CKAN/CKAN/tags for a list of available tags
default: ''

runs:
using: composite
steps:
- name: Install Unity public key
shell: bash
run: >-
wget -qO - https://hub.unity3d.com/linux/keys/public
| gpg --dearmor
| sudo tee /usr/share/keyrings/Unity_Technologies_ApS.gpg > /dev/null
- name: Install Unity apt package
shell: bash
run: >-
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/Unity_Technologies_ApS.gpg] https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list'
- name: Install Unity hub
uses: tecolicom/actions-use-apt-tools@v1
with:
tools: 'unityhub'
5 changes: 4 additions & 1 deletion .github/workflows/internal-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
test-plugin-legacy:
uses: './.github/workflows/internal-test-plugin-legacy.yml'

test-assetbundle:
uses: './.github/workflows/internal-test-assetbundle.yml'

build:
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
Expand Down Expand Up @@ -54,7 +57,7 @@ jobs:

deploy-nuget:
runs-on: ubuntu-latest
needs: [ test-plugin, test-plugin-nuget, test-plugin-legacy ]
needs: [ test-plugin, test-plugin-nuget, test-plugin-legacy, test-assetbundle ]
environment:
name: "NuGet"
url: "https://www.nuget.org/packages/KSPBuildTools"
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/internal-test-assetbundle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This is an internal test for KSPBuildTools and not intended to be used by other projects
name: Test Assetbundle

on:
workflow_call:

env:
TESTDIR: tests/plugin-mod

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/setup-ckan

- uses: ./.github/actions/compile
with:
ksp-zip-url: https://github.com/KSPModdingLibs/KSPLibs/raw/main/KSP-1.12.5.zip
working-directory: ${{ env.TESTDIR }}
solution-file-path: plugin-mod.csproj

0 comments on commit 59ee194

Please sign in to comment.