Skip to content

Commit

Permalink
CI implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Renzo904 committed Dec 15, 2024
1 parent f7045f9 commit 6ec9961
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 2 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build TekaTeka

on:
push:
branches:
- master
- dev

pull_request:
branches:
- master
- dev

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x

- name: Download Dependencies
env:
GAME_DEPENDENCIES_URL: ${{ secrets.GAME_DEPENDENCIES_URL }}
run: |
wget -O dependencies.zip $GAME_DEPENDENCIES_URL -nv
unzip dependencies.zip -d dependencies
- name: Setup Project
run: |
dotnet nuget add source https://nuget.bepinex.dev/v3/index.json
dotnet nuget add source https://nuget.samboy.dev/v3/index.json
dotnet restore TekaTeka.sln
- name: Build Release
run: |
dotnet build "/p:GameDir=$(realpath ./dependencies/);WORKER=GitHub" --configuration Release TekaTeka.sln
- name: Upload Release Artifact
uses: actions/upload-artifact@v4
with:
name: RF.TekaTeka Release
path: |
./TekaTeka/bin/Release/net6.0/RF.TekaTeka.dll
./TekaTeka/bin/Release/net6.0/RF.TekaTeka.pdb
5 changes: 3 additions & 2 deletions TekaTeka/TekaTeka.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
Expand All @@ -11,9 +11,10 @@

<Target Name="UserFile" AfterTargets="PreBuildEvent">
<Copy
Condition="!Exists('.\$(MSBuildProjectDir)\$(ModName).csproj.user')"
Condition="!Exists('.\$(MSBuildProjectDir)\$(ModName).csproj.user') And '$(GameDir)' == ''"
SourceFiles="..\$(MSBuildProjectDir)\Resources\$(ModName).csproj.user"
DestinationFiles=".\$(MSBuildProjectDir)\$(ModName).csproj.user" />
<Message Text="path: $(GameDir)" />
<Error
Condition="$(GameDir)==''"
Text="Set the GameDir variable in .csproj.user file to your Rhythm Festival executable directory." />
Expand Down

0 comments on commit 6ec9961

Please sign in to comment.