Skip to content

Commit

Permalink
why github gotta be difficult
Browse files Browse the repository at this point in the history
  • Loading branch information
drewcassidy committed Sep 14, 2024
1 parent 4dfeda4 commit 48b8fec
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .github/actions/build-assetbundle/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
FROM unityci/editor:ubuntu-2019.4.18f1-windows-mono-3
ARG UNITY_VERSION=2019.4.18f1

# Source from UnityCI's prebuild unity editor containers
FROM unityci/editor:${UNITY_VERSION}-windows-mono-3

#Copy entire KSPBuildTools repo into container
COPY ./ /KSPBuildTools

# Code file to execute when the docker container starts up (`build-assetbundle.sh`)
ENTRYPOINT ["/KSPBuildTools/.github/actions/build-assetbundle/build-assetbundle.sh"]
19 changes: 17 additions & 2 deletions .github/actions/build-assetbundle/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
name: Build Assetbundle
description: Build an assetbundle

inputs:
unity-version:
description: Full unity version name to build with. e.g. 2019.4.18f1
default: '2019.4.18f1'

runs:
using: docker
image: Dockerfile
using: composite
steps:
- name: Build Docker Container
shell: bash
run: |
docker build -f --platform linux/amd64 --tag build-assetbundle --file ${{ github.action_path }}/Dockerfile --build-arg UNITY_VERSION=${{inputs.unity-version}}
working-directory: ${{ github.action_path }}/../../..

- name: Run Docker Container
shell: bash
run: |
docker run build-assetbundle --volume ${{ github.workspace }}:/github/workspace
3 changes: 3 additions & 0 deletions .github/actions/build-assetbundle/build-assetbundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh -l

echo "hello"
7 changes: 7 additions & 0 deletions Editor/AssetBundleBuilder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using UnityEditor;

namespace KSPBuildTools.Editor {
public class AssetBundleBuilder {

}
}
6 changes: 6 additions & 0 deletions KSPBuildTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,11 @@
<ItemGroup>
<Compile Remove="$(MSBuildThisFileDirectory)tests/**" />
<None Remove="$(MSBuildThisFileDirectory)tests/**" />
<Compile Remove="$(MSBuildThisFileDirectory)Editor/**" />
<None Remove="$(MSBuildThisFileDirectory)Editor/**" />
</ItemGroup>

<ItemGroup>
<Folder Include=".github\actions\build-assetbundle\" />
</ItemGroup>
</Project>

0 comments on commit 48b8fec

Please sign in to comment.