-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add github actions building * Fix libs path
- Loading branch information
Showing
8 changed files
with
189 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |