Skip to content

Commit

Permalink
Add Github Actions autobuild (#55)
Browse files Browse the repository at this point in the history
* Add github actions building

* Fix libs path
  • Loading branch information
Graicc authored May 12, 2022
1 parent 0c63898 commit 11d041d
Show file tree
Hide file tree
Showing 8 changed files with 189 additions and 47 deletions.
104 changes: 104 additions & 0 deletions .github/workflows/auto-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# https://gist.github.com/Graicc/8ca16f70e9603e9975d99c4a607ff77a
name: Auto Build
on:
workflow_dispatch:
push:
branches: [master,main]
paths-ignore:
- '**.yml'
- '!.github/workflows/auto-build.yml'
- '**.md'
- '.gitignore'
pull_request:
branches: [master,main]


jobs:
build:
name: build
runs-on: windows-latest
steps:
# Setup
- uses: actions/checkout@v1
- name: Get working directory
id: wd
run: echo "::set-output name=dir::$(((ls . -filter *.csproj -recurse | sort).DirectoryName) | select -last 1)"

# Download required libraries
- name: Download Stripped Libs
uses: robinraju/release-downloader@v1.2
with:
repository: "Gorilla-Tag-Modding-Group/BeatStripper"
latest: true
fileName: "Stripped.zip"
- name: Extract Stripped Libs
run: Expand-Archive .\Stripped.zip ${{steps.wd.outputs.dir}}\Libs
- name: Download BepInEx
uses: robinraju/release-downloader@v1.2
with:
repository: "BepInEx/BepInEx"
latest: true
fileName: "*"
- name: Extract BepInEx
run: |
Expand-Archive BepInEx_x64*.zip Temp
cp Temp\BepInEx\core\*.dll ${{steps.wd.outputs.dir}}\Libs
rm Temp -Recurse
- name: Download Bepinject
uses: robinraju/release-downloader@v1.2
with:
repository: "Auros/Bepinject"
latest: true
fileName: "*"
- name: Extract Bepinject
run: |
Expand-Archive Bepinject*.zip Temp
cp Temp\Bepinject-Auros ${{steps.wd.outputs.dir}}\Libs -Recurse
rm Temp -Recurse
Expand-Archive Extenject*.zip Temp
cp Temp\Extenject ${{steps.wd.outputs.dir}}\Libs -Recurse
rm Temp -Recurse
- name: Download Computer Interface
uses: robinraju/release-downloader@v1.2
with:
repository: "ToniMacaroni/ComputerInterface"
latest: true
fileName: "*"
- name: Extract Computer Interface
run: |
Expand-Archive ComputerInterface*.zip Temp
cp Temp\BepInEx\plugins\ComputerInterface ${{steps.wd.outputs.dir}}\Libs -Recurse
rm Temp -Recurse
# Build the mod
- name: Setup dotnet
uses: actions/setup-dotnet@v1
- name: Build project
env:
CI: TRUE
run: .\MakeRelease.ps1
- name: Prepare build for upload
run: |
$dir = ((ls . -filter *.csproj -recurse | sort).BaseName) | select -last 1
mv $dir-v.zip Build.zip
Expand-Archive Build.zip Build
# Upload the mod
- name: Upload to GitHub
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
if: "${{ env.WEBHOOK_URL == '' }}" # If there is no webhook, upload to the action
uses: actions/upload-artifact@v1
with:
name: Build
path: Build
- name: Upload to Discord
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
if: "${{ env.WEBHOOK_URL != '' }}" # If a webhook is supplied, use it instead
shell: bash
run: |
curl https://raw.githubusercontent.com/ChaoticWeg/discord.sh/master/discord.sh -o discord.sh
./discord.sh \
--webhook-url="${{ secrets.WEBHOOK_URL }}" \
--text '**${{github.actor}}** on **${{github.repository}}**(${{github.ref}}): *${{ github.event.head_commit.message }}*\n<https://github.com/${{github.repository}}/commit/${{github.sha}}>' \
--file Build.zip
14 changes: 7 additions & 7 deletions ComputerInterface.Commands/ComputerInterface.Commands.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@

<ItemGroup>
<Reference Include="BepInEx">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\core\BepInEx.dll</HintPath>
<HintPath>$(BepInExAssemblyPath)\BepInEx.dll</HintPath>
</Reference>
<Reference Include="Bepinject">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\plugins\Bepinject-Auros\Bepinject.dll</HintPath>
<HintPath>$(PluginsPath)\Bepinject-Auros\Bepinject.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>$(GameAssemblyPath)\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<HintPath>$(GameAssemblyPath)\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="Zenject">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\plugins\Extenject\Zenject.dll</HintPath>
<HintPath>$(PluginsPath)\Extenject\Zenject.dll</HintPath>
</Reference>
<Reference Include="Zenject-usage">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\plugins\Extenject\Zenject-usage.dll</HintPath>
<HintPath>$(PluginsPath)\Extenject\Zenject-usage.dll</HintPath>
</Reference>
</ItemGroup>

</Project>
</Project>
12 changes: 10 additions & 2 deletions ComputerInterface.Commands/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project>
<PropertyGroup>
<GamePath>D:\SteamLibrary\steamapps\common\Gorilla Tag</GamePath>
<GamePath>C:\Program Files (x86)\Steam\steamapps\common\Gorilla Tag</GamePath>
<GameAssemblyPath>$(GamePath)\Gorilla Tag_Data\Managed</GameAssemblyPath>
<BepInExAssemblyPath>$(GamePath)\BepInEx\core</BepInExAssemblyPath>
<PluginsPath>$(GamePath)\BepInEx\plugins</PluginsPath>
<ZipDir>$(SolutionDir)ReleaseZip</ZipDir>
</PropertyGroup>
</Project>
<PropertyGroup Condition="'$(CI)'=='TRUE'">
<GameAssemblyPath>..\ComputerInterface\Libs</GameAssemblyPath>
<BepInExAssemblyPath>..\ComputerInterface\Libs</BepInExAssemblyPath>
<PluginsPath>..\ComputerInterface\Libs</PluginsPath>
<WarningLevel>0</WarningLevel>
</PropertyGroup>
</Project>
26 changes: 13 additions & 13 deletions ComputerInterface.RoomBrowser/ComputerInterface.RoomBrowser.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,43 @@

<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\Assembly-CSharp.dll</HintPath>
<HintPath>$(GameAssemblyPath)\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="BepInEx">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\core\BepInEx.dll</HintPath>
<HintPath>$(BepInExAssemblyPath)\BepInEx.dll</HintPath>
</Reference>
<Reference Include="Bepinject">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\plugins\Bepinject-Auros\Bepinject.dll</HintPath>
<HintPath>$(PluginsPath)\Bepinject-Auros\Bepinject.dll</HintPath>
</Reference>
<Reference Include="Photon3Unity3D">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\Photon3Unity3D.dll</HintPath>
<HintPath>$(GameAssemblyPath)\Photon3Unity3D.dll</HintPath>
</Reference>
<Reference Include="PhotonRealtime">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\PhotonRealtime.dll</HintPath>
<HintPath>$(GameAssemblyPath)\PhotonRealtime.dll</HintPath>
</Reference>
<Reference Include="PhotonUnityNetworking">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\PhotonUnityNetworking.dll</HintPath>
<HintPath>$(GameAssemblyPath)\PhotonUnityNetworking.dll</HintPath>
</Reference>
<Reference Include="PhotonVoice">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\PhotonVoice.dll</HintPath>
<HintPath>$(GameAssemblyPath)\PhotonVoice.dll</HintPath>
</Reference>
<Reference Include="PhotonVoice.API">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\PhotonVoice.API.dll</HintPath>
<HintPath>$(GameAssemblyPath)\PhotonVoice.API.dll</HintPath>
</Reference>
<Reference Include="PlayFab">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\PlayFab.dll</HintPath>
<HintPath>$(GameAssemblyPath)\PlayFab.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>$(GameAssemblyPath)\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<HintPath>$(GameAssemblyPath)\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="Zenject">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\plugins\Extenject\Zenject.dll</HintPath>
<HintPath>$(PluginsPath)\Extenject\Zenject.dll</HintPath>
</Reference>
<Reference Include="Zenject-usage">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\plugins\Extenject\Zenject-usage.dll</HintPath>
<HintPath>$(PluginsPath)\Extenject\Zenject-usage.dll</HintPath>
</Reference>
</ItemGroup>

Expand Down
12 changes: 10 additions & 2 deletions ComputerInterface.RoomBrowser/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project>
<PropertyGroup>
<GamePath>D:\SteamLibrary\steamapps\common\Gorilla Tag</GamePath>
<GamePath>C:\Program Files (x86)\Steam\steamapps\common\Gorilla Tag</GamePath>
<GameAssemblyPath>$(GamePath)\Gorilla Tag_Data\Managed</GameAssemblyPath>
<BepInExAssemblyPath>$(GamePath)\BepInEx\core</BepInExAssemblyPath>
<PluginsPath>$(GamePath)\BepInEx\plugins</PluginsPath>
<ZipDir>$(SolutionDir)ReleaseZip</ZipDir>
</PropertyGroup>
</Project>
<PropertyGroup Condition="'$(CI)'=='TRUE'">
<GameAssemblyPath>..\ComputerInterface\Libs</GameAssemblyPath>
<BepInExAssemblyPath>..\ComputerInterface\Libs</BepInExAssemblyPath>
<PluginsPath>..\ComputerInterface\Libs</PluginsPath>
<WarningLevel>0</WarningLevel>
</PropertyGroup>
</Project>
42 changes: 21 additions & 21 deletions ComputerInterface/ComputerInterface.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,64 +22,64 @@

<ItemGroup>
<Reference Include="0Harmony">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\core\0Harmony.dll</HintPath>
<HintPath>$(BepInExAssemblyPath)\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\Assembly-CSharp.dll</HintPath>
<HintPath>$(GameAssemblyPath)\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="BepInEx">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\core\BepInEx.dll</HintPath>
<HintPath>$(BepInExAssemblyPath)\BepInEx.dll</HintPath>
</Reference>
<Reference Include="Bepinject">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\plugins\Bepinject-Auros\Bepinject.dll</HintPath>
<HintPath>$(PluginsPath)\Bepinject-Auros\Bepinject.dll</HintPath>
</Reference>
<Reference Include="Photon3Unity3D">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\Photon3Unity3D.dll</HintPath>
<HintPath>$(GameAssemblyPath)\Photon3Unity3D.dll</HintPath>
</Reference>
<Reference Include="PhotonRealtime">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\PhotonRealtime.dll</HintPath>
<HintPath>$(GameAssemblyPath)\PhotonRealtime.dll</HintPath>
</Reference>
<Reference Include="PhotonUnityNetworking">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\PhotonUnityNetworking.dll</HintPath>
<HintPath>$(GameAssemblyPath)\PhotonUnityNetworking.dll</HintPath>
</Reference>
<Reference Include="PlayFab">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\PlayFab.dll</HintPath>
<HintPath>$(GameAssemblyPath)\PlayFab.dll</HintPath>
</Reference>
<Reference Include="Unity.InputSystem">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\Unity.InputSystem.dll</HintPath>
<HintPath>$(GameAssemblyPath)\Unity.InputSystem.dll</HintPath>
</Reference>
<Reference Include="Unity.TextMeshPro">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\plugins\ComputerInterface\Unity.TextMeshPro.dll</HintPath>
<HintPath>$(PluginsPath)\ComputerInterface\Unity.TextMeshPro.dll</HintPath>
</Reference>
<Reference Include="Unity.XR.Interaction.Toolkit">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\Unity.XR.Interaction.Toolkit.dll</HintPath>
<HintPath>$(GameAssemblyPath)\Unity.XR.Interaction.Toolkit.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>$(GameAssemblyPath)\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
<HintPath>$(GameAssemblyPath)\UnityEngine.AssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\UnityEngine.AudioModule.dll</HintPath>
<HintPath>$(GameAssemblyPath)\UnityEngine.AudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<HintPath>$(GameAssemblyPath)\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ImageConversionModule">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\UnityEngine.ImageConversionModule.dll</HintPath>
<HintPath>$(GameAssemblyPath)\UnityEngine.ImageConversionModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
<HintPath>$(GameAssemblyPath)\UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\Gorilla Tag_Data\Managed\UnityEngine.UI.dll</HintPath>
<HintPath>$(GameAssemblyPath)\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="Zenject">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\plugins\Extenject\Zenject.dll</HintPath>
<HintPath>$(PluginsPath)\Extenject\Zenject.dll</HintPath>
</Reference>
<Reference Include="Zenject-usage">
<HintPath>D:\SteamLibrary\steamapps\common\Gorilla Tag\BepInEx\plugins\Extenject\Zenject-usage.dll</HintPath>
<HintPath>$(PluginsPath)\Extenject\Zenject-usage.dll</HintPath>
</Reference>
</ItemGroup>

Expand All @@ -89,4 +89,4 @@
<StartArguments>-applaunch 1533390 -vrmode oculus --verbose fpfc</StartArguments>
</PropertyGroup>

</Project>
</Project>
12 changes: 10 additions & 2 deletions ComputerInterface/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project>
<PropertyGroup>
<GamePath>D:\SteamLibrary\steamapps\common\Gorilla Tag</GamePath>
<GamePath>C:\Program Files (x86)\Steam\steamapps\common\Gorilla Tag</GamePath>
<GameAssemblyPath>$(GamePath)\Gorilla Tag_Data\Managed</GameAssemblyPath>
<BepInExAssemblyPath>$(GamePath)\BepInEx\core</BepInExAssemblyPath>
<PluginsPath>$(GamePath)\BepInEx\plugins</PluginsPath>
<ZipDir>$(SolutionDir)ReleaseZip</ZipDir>
</PropertyGroup>
</Project>
<PropertyGroup Condition="'$(CI)'=='TRUE'">
<GameAssemblyPath>.\Libs</GameAssemblyPath>
<BepInExAssemblyPath>.\Libs</BepInExAssemblyPath>
<PluginsPath>.\Libs</PluginsPath>
<WarningLevel>0</WarningLevel>
</PropertyGroup>
</Project>
14 changes: 14 additions & 0 deletions MakeRelease.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#Requires -Modules @{ ModuleName="Microsoft.PowerShell.Archive"; ModuleVersion="1.2.3" }
$MyInvocation.MyCommand.Path | Split-Path | Push-Location # Run from this script's directory
$Name = ((ls . -filter *.csproj -recurse | sort).BaseName) | select -last 1
dotnet build -c Release
curl -L https://github.com/ToniMacaroni/ComputerInterface/releases/download/1.4.12/ComputerInterface.zip -o DL.zip
Expand-Archive DL.zip
rm DL.zip
mv DL\BepInEx .
rm DL
cp .\ReleaseZip\BepInEx\plugins\$Name\$Name* .\BepInEx\plugins\$Name\
Compress-Archive .\BepInEx\ $Name-v
rmdir .\BepInEx\ -R
rm ReleaseZip -R
Pop-Location

0 comments on commit 11d041d

Please sign in to comment.