From 8b36044bcfc51a4395d34628c76e1685b50646a3 Mon Sep 17 00:00:00 2001 From: SlejmUr Date: Sun, 15 Dec 2024 13:09:12 +0100 Subject: [PATCH 1/8] add workflow for building .net project --- .github/workflows/dotnet_build.yml | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/dotnet_build.yml diff --git a/.github/workflows/dotnet_build.yml b/.github/workflows/dotnet_build.yml new file mode 100644 index 0000000..1aceea3 --- /dev/null +++ b/.github/workflows/dotnet_build.yml @@ -0,0 +1,46 @@ +name: Dotnet Build + +on: + push: + paths-ignore: + - '**/*.md' + pull_request: + paths-ignore: + - '**/*.md' + workflow_dispatch: + # allows manual trigger + +jobs: + linux: + runs-on: windows-latest + strategy: + matrix: + builds: [ 'Debug', 'ExportDebug', 'ExportRelease', 'DebugClient', 'DebugServer' ] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Clone EIV Nuget repository + uses: actions/checkout@v2 + with: + repository: ExtractIntoVoid/Nuget + path: eiv_nuget + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Add eiv_nuget to nuget souce + run: dotnet nuget add source --name eiv_nuget "eiv_nuget" + + - name: Publish + run: dotnet publish EIV_Game.csproj -c ${{ matrix.builds }} -o Out + + # This is test if works. For future we dont need this! + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: EIV_Game_DOTNET-${{ matrix.builds }} + path: Out + if-no-files-found: error \ No newline at end of file From 01a8884383c7eae2a80b2c46cea5ce1823d191b7 Mon Sep 17 00:00:00 2001 From: SlejmUr Date: Sun, 15 Dec 2024 13:15:20 +0100 Subject: [PATCH 2/8] try fix nuget add and update checkout --- .github/workflows/dotnet_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet_build.yml b/.github/workflows/dotnet_build.yml index 1aceea3..6bb4adf 100644 --- a/.github/workflows/dotnet_build.yml +++ b/.github/workflows/dotnet_build.yml @@ -21,7 +21,7 @@ jobs: uses: actions/checkout@v4 - name: Clone EIV Nuget repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: ExtractIntoVoid/Nuget path: eiv_nuget @@ -32,7 +32,7 @@ jobs: dotnet-version: '8.0.x' - name: Add eiv_nuget to nuget souce - run: dotnet nuget add source --name eiv_nuget "eiv_nuget" + run: dotnet nuget add source --name eiv_nuget "${{GITHUB_WORKSPACE}}/eiv_nuget" - name: Publish run: dotnet publish EIV_Game.csproj -c ${{ matrix.builds }} -o Out From c4fc53e41da32d32302ef4502fa7be2af2b6c944 Mon Sep 17 00:00:00 2001 From: SlejmUr Date: Sun, 15 Dec 2024 13:16:07 +0100 Subject: [PATCH 3/8] test 2 --- .github/workflows/dotnet_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet_build.yml b/.github/workflows/dotnet_build.yml index 6bb4adf..c5ca29e 100644 --- a/.github/workflows/dotnet_build.yml +++ b/.github/workflows/dotnet_build.yml @@ -32,7 +32,7 @@ jobs: dotnet-version: '8.0.x' - name: Add eiv_nuget to nuget souce - run: dotnet nuget add source --name eiv_nuget "${{GITHUB_WORKSPACE}}/eiv_nuget" + run: dotnet nuget add source --name eiv_nuget "$GITHUB_WORKSPACE/eiv_nuget" - name: Publish run: dotnet publish EIV_Game.csproj -c ${{ matrix.builds }} -o Out From c8d561cd5c4c902c81e32940fc51dbbce1e37fd0 Mon Sep 17 00:00:00 2001 From: SlejmUr Date: Sun, 15 Dec 2024 13:21:31 +0100 Subject: [PATCH 4/8] test 3 --- .github/workflows/dotnet_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet_build.yml b/.github/workflows/dotnet_build.yml index c5ca29e..4889696 100644 --- a/.github/workflows/dotnet_build.yml +++ b/.github/workflows/dotnet_build.yml @@ -32,7 +32,7 @@ jobs: dotnet-version: '8.0.x' - name: Add eiv_nuget to nuget souce - run: dotnet nuget add source --name eiv_nuget "$GITHUB_WORKSPACE/eiv_nuget" + run: dotnet nuget add source --name eiv_nuget ./eiv_nuget - name: Publish run: dotnet publish EIV_Game.csproj -c ${{ matrix.builds }} -o Out From d9e6e9ecee5e6787852fc0f2ff4c87ca7bc3ab34 Mon Sep 17 00:00:00 2001 From: SlejmUr Date: Sun, 15 Dec 2024 13:25:09 +0100 Subject: [PATCH 5/8] test 4 --- .github/workflows/dotnet_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet_build.yml b/.github/workflows/dotnet_build.yml index 4889696..11cffb7 100644 --- a/.github/workflows/dotnet_build.yml +++ b/.github/workflows/dotnet_build.yml @@ -32,7 +32,7 @@ jobs: dotnet-version: '8.0.x' - name: Add eiv_nuget to nuget souce - run: dotnet nuget add source --name eiv_nuget ./eiv_nuget + run: dotnet nuget add source --name eiv_nuget $env:GITHUB_WORKSPACE/eiv_nuget - name: Publish run: dotnet publish EIV_Game.csproj -c ${{ matrix.builds }} -o Out From b1ee5e7ef70bc2153e28e113061a99e4113bb448 Mon Sep 17 00:00:00 2001 From: SlejmUr Date: Sun, 15 Dec 2024 13:31:38 +0100 Subject: [PATCH 6/8] remove Uploading artifact. Fixing BuildDefined --- .github/workflows/dotnet_build.yml | 16 ++++++++-------- csharp/Managers/BuildDefined.cs | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dotnet_build.yml b/.github/workflows/dotnet_build.yml index 11cffb7..4e9acfe 100644 --- a/.github/workflows/dotnet_build.yml +++ b/.github/workflows/dotnet_build.yml @@ -11,7 +11,7 @@ on: # allows manual trigger jobs: - linux: + build: runs-on: windows-latest strategy: matrix: @@ -37,10 +37,10 @@ jobs: - name: Publish run: dotnet publish EIV_Game.csproj -c ${{ matrix.builds }} -o Out - # This is test if works. For future we dont need this! - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: EIV_Game_DOTNET-${{ matrix.builds }} - path: Out - if-no-files-found: error \ No newline at end of file +# # This is test if works. For future we dont need this! +# - name: Upload artifact +# uses: actions/upload-artifact@v4 +# with: +# name: EIV_Game_DOTNET-${{ matrix.builds }} +# path: Out +# if-no-files-found: error \ No newline at end of file diff --git a/csharp/Managers/BuildDefined.cs b/csharp/Managers/BuildDefined.cs index 002b48b..12f11e2 100644 --- a/csharp/Managers/BuildDefined.cs +++ b/csharp/Managers/BuildDefined.cs @@ -46,6 +46,8 @@ public static ReleaseType Release "Server.ini" #elif CLIENT "Client.ini" +#else + "" #endif ); } From 4b0241b64ae767dc2f5e1be74a055a81b148ee60 Mon Sep 17 00:00:00 2001 From: SlejmUr Date: Sun, 15 Dec 2024 13:35:52 +0100 Subject: [PATCH 7/8] Fix LobbyScene --- csharp/Menus/LobbyScene.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/csharp/Menus/LobbyScene.cs b/csharp/Menus/LobbyScene.cs index ee7ac09..2c80619 100644 --- a/csharp/Menus/LobbyScene.cs +++ b/csharp/Menus/LobbyScene.cs @@ -1,4 +1,5 @@ -using ExtractIntoVoid.Managers; +#if CLIENT || GAME +using ExtractIntoVoid.Managers; using ExtractIntoVoid.Worlds; using Godot; @@ -30,3 +31,4 @@ public void Quit() } } +#endif \ No newline at end of file From e5443675f36196bbf1bce778b7542286b2ebd8ec Mon Sep 17 00:00:00 2001 From: SlejmUr Date: Sun, 15 Dec 2024 19:44:57 +0100 Subject: [PATCH 8/8] Add packing, and uploading now added --- .github/workflows/dotnet_build.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dotnet_build.yml b/.github/workflows/dotnet_build.yml index 4e9acfe..d3e0c6b 100644 --- a/.github/workflows/dotnet_build.yml +++ b/.github/workflows/dotnet_build.yml @@ -15,6 +15,7 @@ jobs: runs-on: windows-latest strategy: matrix: + # ExportX is only for building godot. builds: [ 'Debug', 'ExportDebug', 'ExportRelease', 'DebugClient', 'DebugServer' ] steps: - name: Checkout @@ -37,10 +38,12 @@ jobs: - name: Publish run: dotnet publish EIV_Game.csproj -c ${{ matrix.builds }} -o Out -# # This is test if works. For future we dont need this! -# - name: Upload artifact -# uses: actions/upload-artifact@v4 -# with: -# name: EIV_Game_DOTNET-${{ matrix.builds }} -# path: Out -# if-no-files-found: error \ No newline at end of file + - name: Package + run: dotnet pack EIV_Game.csproj -c ${{ matrix.builds }} -o Out + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: EIV_Game_DOTNET-${{ matrix.builds }} + path: Out + if-no-files-found: error \ No newline at end of file