From 2a9012a503e74d65fe5a1459d95d24e033304630 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 12:30:39 +1000 Subject: [PATCH 01/32] updated to .net8.0 and added Github Action --- .../workflows/build-tentacleping-dotnet.yml | 43 +++++++++++++++++++ source/TentaclePing/Program.cs | 4 ++ source/TentaclePing/TentaclePing.csproj | 2 +- source/TentaclePong/Program.cs | 2 + source/TentaclePong/TentaclePong.csproj | 2 +- 5 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build-tentacleping-dotnet.yml diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml new file mode 100644 index 0000000..ca4b40d --- /dev/null +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -0,0 +1,43 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: .NET TentaclePing + +on: + pull_request: + branches: [ "main" ] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, ubuntu-24.04-arm] + include: + - os: ubuntu-latest + runtime: linux-x64 + - os: windows-latest + runtime: win-x64 + - os: ubuntu-24.04-arm + runtime: linux-arm64 + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --no-restore + + - name: Publish Self-Contained + run: dotnet publish -c Release -r ${{ matrix.runtime }} --self-contained + + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: tentacleping-${{ matrix.runtime }}-dotnet + path: source/*/bin/Release/*/publish/ \ No newline at end of file diff --git a/source/TentaclePing/Program.cs b/source/TentaclePing/Program.cs index 1bd95ba..12981ff 100644 --- a/source/TentaclePing/Program.cs +++ b/source/TentaclePing/Program.cs @@ -34,7 +34,11 @@ static int Main(string[] args) { chunkSize = int.Parse(args[3]); } + + #pragma warning disable SYSLIB0039 var sslProtocol = SslProtocols.Tls; + #pragma warning restore SYSLIB0039 + if (args.Length == 5) { if (Enum.TryParse(args[4], out var parsedSslProtocol)) diff --git a/source/TentaclePing/TentaclePing.csproj b/source/TentaclePing/TentaclePing.csproj index 36d0f55..f02974e 100644 --- a/source/TentaclePing/TentaclePing.csproj +++ b/source/TentaclePing/TentaclePing.csproj @@ -8,7 +8,7 @@ TentaclePing false true - netcoreapp3.1 + net8.0;net8.0-windows EXE diff --git a/source/TentaclePong/Program.cs b/source/TentaclePong/Program.cs index aecaf90..c77130e 100644 --- a/source/TentaclePong/Program.cs +++ b/source/TentaclePong/Program.cs @@ -99,7 +99,9 @@ static void ExecuteRequest(TcpClient client) { // We don't actually validate the client, accepting anything; validation // status is reflected in validClientThumprint != null. + #pragma warning disable SYSLIB0039 ssl.AuthenticateAsServer(serverCertificate, true, SslProtocols.Tls, false); + #pragma warning restore SYSLIB0039 var reader = new StreamReader(ssl); diff --git a/source/TentaclePong/TentaclePong.csproj b/source/TentaclePong/TentaclePong.csproj index fee4401..faed41d 100644 --- a/source/TentaclePong/TentaclePong.csproj +++ b/source/TentaclePong/TentaclePong.csproj @@ -8,7 +8,7 @@ TentaclePong false true - netcoreapp3.1 + net8.0;net8.0-windows EXE From 8c89e8803533a9ae871bb1defdeb9a462f36055e Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 13:28:25 +1000 Subject: [PATCH 02/32] Update build-tentacleping-dotnet.yml --- .../workflows/build-tentacleping-dotnet.yml | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index ca4b40d..26f1c2f 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -28,16 +28,37 @@ jobs: with: dotnet-version: 8.0.x - name: Restore dependencies - run: dotnet restore + run: dotnet restore source/ - name: Build - run: dotnet build --no-restore + run: dotnet build source/ --no-restore -c Release - name: Publish Self-Contained - run: dotnet publish -c Release -r ${{ matrix.runtime }} --self-contained + run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -o publish/ + + - name: Organize Published Files + run: | + # Create a flat structure for archiving + mkdir -p dist + cp publish/TentaclePing/TentaclePing* dist/ 2>/dev/null || true + cp publish/TentaclePong/TentaclePong* dist/ 2>/dev/null || true + ls -la dist/ + + - name: Create Archive (Linux) + if: runner.os != 'Windows' + run: | + tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C dist . + + - name: Create Archive (Windows) + if: runner.os == 'Windows' + run: | + Compress-Archive -Path dist\* -DestinationPath TentaclePing-${{ matrix.runtime }}.zip - name: Upload Artifacts uses: actions/upload-artifact@v4 with: - name: tentacleping-${{ matrix.runtime }}-dotnet - path: source/*/bin/Release/*/publish/ \ No newline at end of file + name: TentaclePing-${{ matrix.runtime }} + path: | + TentaclePing-${{ matrix.runtime }}.tar.gz + TentaclePing-${{ matrix.runtime }}.zip + From 2792af1552890ac21eae4c83c04ef7eccd71507e Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 13:31:23 +1000 Subject: [PATCH 03/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 26f1c2f..86a2cd5 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -34,14 +34,13 @@ jobs: run: dotnet build source/ --no-restore -c Release - name: Publish Self-Contained - run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -o publish/ + run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained - name: Organize Published Files run: | - # Create a flat structure for archiving mkdir -p dist - cp publish/TentaclePing/TentaclePing* dist/ 2>/dev/null || true - cp publish/TentaclePong/TentaclePong* dist/ 2>/dev/null || true + cp source/TentaclePing/bin/Release/net8.0/${{ matrix.runtime }}/publish/TentaclePing* dist/ 2>/dev/null || true + cp source/TentaclePong/bin/Release/net8.0/${{ matrix.runtime }}/publish/TentaclePong* dist/ 2>/dev/null || true ls -la dist/ - name: Create Archive (Linux) From a1c47ae961bfb943492e0203a8b3959cabe69114 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 13:34:22 +1000 Subject: [PATCH 04/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 86a2cd5..6de20b8 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -15,10 +15,13 @@ jobs: include: - os: ubuntu-latest runtime: linux-x64 + framework: net8.0 - os: windows-latest runtime: win-x64 + framework: net8.0-windows - os: ubuntu-24.04-arm runtime: linux-arm64 + framework: net8.0 runs-on: ${{ matrix.os }} steps: @@ -34,7 +37,7 @@ jobs: run: dotnet build source/ --no-restore -c Release - name: Publish Self-Contained - run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained + run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} - name: Organize Published Files run: | From 82f651e1797ad4f2cddbe4e556d1c7f1189e4f7a Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 13:39:23 +1000 Subject: [PATCH 05/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 6de20b8..aa96640 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -42,9 +42,8 @@ jobs: - name: Organize Published Files run: | mkdir -p dist - cp source/TentaclePing/bin/Release/net8.0/${{ matrix.runtime }}/publish/TentaclePing* dist/ 2>/dev/null || true - cp source/TentaclePong/bin/Release/net8.0/${{ matrix.runtime }}/publish/TentaclePong* dist/ 2>/dev/null || true - ls -la dist/ + cp source/TentaclePing/bin/Release/net8.0/${{ matrix.runtime }}/publish/TentaclePing* dist/ || true + cp source/TentaclePong/bin/Release/net8.0/${{ matrix.runtime }}/publish/TentaclePong* dist/ || true - name: Create Archive (Linux) if: runner.os != 'Windows' From 9f5abc499188aa51972ab0254522fac18d749417 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 13:44:15 +1000 Subject: [PATCH 06/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index aa96640..ec2b31d 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -42,9 +42,9 @@ jobs: - name: Organize Published Files run: | mkdir -p dist - cp source/TentaclePing/bin/Release/net8.0/${{ matrix.runtime }}/publish/TentaclePing* dist/ || true - cp source/TentaclePong/bin/Release/net8.0/${{ matrix.runtime }}/publish/TentaclePong* dist/ || true - + cp source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePing* dist/ 2>/dev/null || true + cp source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePong* dist/ 2>/dev/null || true + - name: Create Archive (Linux) if: runner.os != 'Windows' run: | From 405b393a8a2014cd61218ace9aad575973c09580 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 14:05:13 +1000 Subject: [PATCH 07/32] Update build-tentacleping-dotnet.yml --- .../workflows/build-tentacleping-dotnet.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index ec2b31d..89efe46 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -37,23 +37,20 @@ jobs: run: dotnet build source/ --no-restore -c Release - name: Publish Self-Contained - run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} + run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true - - name: Organize Published Files - run: | - mkdir -p dist - cp source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePing* dist/ 2>/dev/null || true - cp source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePong* dist/ 2>/dev/null || true - - name: Create Archive (Linux) + - name: Create Archives (Linux) if: runner.os != 'Windows' run: | - tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C dist . - - - name: Create Archive (Windows) + tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C publish/TentaclePing . + tar -czf TentaclePong-${{ matrix.runtime }}.tar.gz -C publish/TentaclePong . + + - name: Create Archives (Windows) if: runner.os == 'Windows' run: | - Compress-Archive -Path dist\* -DestinationPath TentaclePing-${{ matrix.runtime }}.zip + Compress-Archive -Path publish\TentaclePing.exe -DestinationPath TentaclePing-${{ matrix.runtime }}.zip + Compress-Archive -Path publish\TentaclePong.exe -DestinationPath TentaclePong-${{ matrix.runtime }}.zip - name: Upload Artifacts uses: actions/upload-artifact@v4 From 222b7bbd0886c08a3d80b112c6a399625385560c Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 14:07:22 +1000 Subject: [PATCH 08/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 89efe46..d5e0bed 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -43,14 +43,14 @@ jobs: - name: Create Archives (Linux) if: runner.os != 'Windows' run: | - tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C publish/TentaclePing . - tar -czf TentaclePong-${{ matrix.runtime }}.tar.gz -C publish/TentaclePong . + tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C source/TentaclePing/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish . + tar -czf TentaclePong-${{ matrix.runtime }}.tar.gz -C source/TentaclePong/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish . - name: Create Archives (Windows) if: runner.os == 'Windows' run: | - Compress-Archive -Path publish\TentaclePing.exe -DestinationPath TentaclePing-${{ matrix.runtime }}.zip - Compress-Archive -Path publish\TentaclePong.exe -DestinationPath TentaclePong-${{ matrix.runtime }}.zip + Compress-Archive -Path source/TentaclePing/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish/TentaclePing.exe -DestinationPath TentaclePing-${{ matrix.runtime }}.zip + Compress-Archive -Path source/TentaclePong/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish/TentaclePong.exe -DestinationPath TentaclePong-${{ matrix.runtime }}.zip - name: Upload Artifacts uses: actions/upload-artifact@v4 From 5765c549fcfdd245b4133177872c9d30e7097f60 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 14:10:11 +1000 Subject: [PATCH 09/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index d5e0bed..01c520a 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -43,14 +43,14 @@ jobs: - name: Create Archives (Linux) if: runner.os != 'Windows' run: | - tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C source/TentaclePing/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish . - tar -czf TentaclePong-${{ matrix.runtime }}.tar.gz -C source/TentaclePong/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish . + tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePing/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish . + tar -czf TentaclePong-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePong/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish . - name: Create Archives (Windows) if: runner.os == 'Windows' run: | - Compress-Archive -Path source/TentaclePing/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish/TentaclePing.exe -DestinationPath TentaclePing-${{ matrix.runtime }}.zip - Compress-Archive -Path source/TentaclePong/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish/TentaclePong.exe -DestinationPath TentaclePong-${{ matrix.runtime }}.zip + Compress-Archive -Path ./source/TentaclePing/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish/TentaclePing.exe -DestinationPath TentaclePing-${{ matrix.runtime }}.zip + Compress-Archive -Path ./source/TentaclePong/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish/TentaclePong.exe -DestinationPath TentaclePong-${{ matrix.runtime }}.zip - name: Upload Artifacts uses: actions/upload-artifact@v4 From d422761ed836774b2b24b4b989fb873dcf67b343 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 14:11:22 +1000 Subject: [PATCH 10/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 01c520a..2b3d872 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -43,6 +43,7 @@ jobs: - name: Create Archives (Linux) if: runner.os != 'Windows' run: | + pwd tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePing/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish . tar -czf TentaclePong-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePong/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish . From 607be5f6600dfe132f271ffc2460ed3b00bb9cf3 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 14:13:40 +1000 Subject: [PATCH 11/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 2b3d872..5fe116e 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -44,14 +44,14 @@ jobs: if: runner.os != 'Windows' run: | pwd - tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePing/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish . - tar -czf TentaclePong-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePong/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish . + tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish . + tar -czf TentaclePong-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish . - name: Create Archives (Windows) if: runner.os == 'Windows' run: | - Compress-Archive -Path ./source/TentaclePing/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish/TentaclePing.exe -DestinationPath TentaclePing-${{ matrix.runtime }}.zip - Compress-Archive -Path ./source/TentaclePong/bin/Release/${{ matrix.runtime }}/${{ matrix.framework }}/publish/TentaclePong.exe -DestinationPath TentaclePong-${{ matrix.runtime }}.zip + Compress-Archive -Path ./source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePing.exe -DestinationPath TentaclePing-${{ matrix.runtime }}.zip + Compress-Archive -Path ./source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePong.exe -DestinationPath TentaclePong-${{ matrix.runtime }}.zip - name: Upload Artifacts uses: actions/upload-artifact@v4 From d2b26969e709d43324f461854de07e72fec38093 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 14:13:48 +1000 Subject: [PATCH 12/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 5fe116e..413d9bd 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -43,7 +43,6 @@ jobs: - name: Create Archives (Linux) if: runner.os != 'Windows' run: | - pwd tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish . tar -czf TentaclePong-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish . From 637944e1b0463bfa0b0770e89d22e737554be1e3 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 14:16:48 +1000 Subject: [PATCH 13/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 413d9bd..565eb69 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -37,7 +37,7 @@ jobs: run: dotnet build source/ --no-restore -c Release - name: Publish Self-Contained - run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true + run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None - name: Create Archives (Linux) From 3074c1edf8f55508609b6dc15904b2c75499cd0d Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 14:48:29 +1000 Subject: [PATCH 14/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 565eb69..cec5872 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -37,7 +37,7 @@ jobs: run: dotnet build source/ --no-restore -c Release - name: Publish Self-Contained - run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None + run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=false - name: Create Archives (Linux) From 6f032b7b10e485f23e8fb3e0637c88c8ecfee562 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 14:55:35 +1000 Subject: [PATCH 15/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index cec5872..d3269cc 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -37,7 +37,9 @@ jobs: run: dotnet build source/ --no-restore -c Release - name: Publish Self-Contained - run: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=false + run: | + dotnet publish source/TentaclePing/TentaclePing.csproj -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=false + dotnet publish source/TentaclePong/TentaclePong.csproj -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=false - name: Create Archives (Linux) From 3bd61286cf009ed438ce3f7ea617f3286e9ab0e9 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 15:01:53 +1000 Subject: [PATCH 16/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index d3269cc..76ad868 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -33,13 +33,18 @@ jobs: - name: Restore dependencies run: dotnet restore source/ + - name: Install Build Dependencies (Linux) + if: runner.os != 'Windows' + run: | + sudo apt-get update + sudo apt-get install -y zlib1g-dev libssl-dev + - name: Build run: dotnet build source/ --no-restore -c Release - name: Publish Self-Contained run: | - dotnet publish source/TentaclePing/TentaclePing.csproj -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=false - dotnet publish source/TentaclePong/TentaclePong.csproj -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=false + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=false - name: Create Archives (Linux) From bf40c2781892c71323dc8d19bd098f462bb4be36 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 15:07:11 +1000 Subject: [PATCH 17/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 76ad868..a779619 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -44,7 +44,7 @@ jobs: - name: Publish Self-Contained run: | - dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=false + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=true - name: Create Archives (Linux) From e7c51f2b374526b1ae67485df923fdbdfd084879 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 15:13:19 +1000 Subject: [PATCH 18/32] Update build-tentacleping-dotnet.yml --- .../workflows/build-tentacleping-dotnet.yml | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index a779619..34d9b71 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -43,8 +43,35 @@ jobs: run: dotnet build source/ --no-restore -c Release - name: Publish Self-Contained + shell: bash run: | - dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=true + echo "Publishing TentaclePing individually..." + dotnet publish source/TentaclePing/TentaclePing.csproj \ + -c Release \ + -r ${{ matrix.runtime }} \ + --self-contained \ + -f ${{ matrix.framework }} \ + -p:IncludeNativeLibrariesForSelfExtract=true \ + -p:PublishSingleFile=true \ + -p:DebugType=None \ + -p:PublishTrimmed=false \ + -p:PublishReadyToRun=false + + echo "Publishing TentaclePong individually..." + dotnet publish source/TentaclePong/TentaclePong.csproj \ + -c Release \ + -r ${{ matrix.runtime }} \ + --self-contained \ + -f ${{ matrix.framework }} \ + -p:IncludeNativeLibrariesForSelfExtract=true \ + -p:PublishSingleFile=true \ + -p:DebugType=None \ + -p:PublishTrimmed=false \ + -p:PublishReadyToRun=false + + echo "Checking published files..." + ls -la source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/ + ls -la source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/ - name: Create Archives (Linux) From 04c7b262fb59a220bff9e0da7190b20976ff3264 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 15:24:10 +1000 Subject: [PATCH 19/32] Update build-tentacleping-dotnet.yml --- .../workflows/build-tentacleping-dotnet.yml | 35 +------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 34d9b71..024e1a8 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -33,45 +33,12 @@ jobs: - name: Restore dependencies run: dotnet restore source/ - - name: Install Build Dependencies (Linux) - if: runner.os != 'Windows' - run: | - sudo apt-get update - sudo apt-get install -y zlib1g-dev libssl-dev - - name: Build run: dotnet build source/ --no-restore -c Release - name: Publish Self-Contained - shell: bash run: | - echo "Publishing TentaclePing individually..." - dotnet publish source/TentaclePing/TentaclePing.csproj \ - -c Release \ - -r ${{ matrix.runtime }} \ - --self-contained \ - -f ${{ matrix.framework }} \ - -p:IncludeNativeLibrariesForSelfExtract=true \ - -p:PublishSingleFile=true \ - -p:DebugType=None \ - -p:PublishTrimmed=false \ - -p:PublishReadyToRun=false - - echo "Publishing TentaclePong individually..." - dotnet publish source/TentaclePong/TentaclePong.csproj \ - -c Release \ - -r ${{ matrix.runtime }} \ - --self-contained \ - -f ${{ matrix.framework }} \ - -p:IncludeNativeLibrariesForSelfExtract=true \ - -p:PublishSingleFile=true \ - -p:DebugType=None \ - -p:PublishTrimmed=false \ - -p:PublishReadyToRun=false - - echo "Checking published files..." - ls -la source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/ - ls -la source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/ + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=false -p:IncludeAllContentForSelfExtract=true - name: Create Archives (Linux) From 46c2b031409e3164ff238fb984c63d99c5cfa5cf Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 16:02:16 +1000 Subject: [PATCH 20/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 024e1a8..a98024b 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -38,7 +38,7 @@ jobs: - name: Publish Self-Contained run: | - dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=None -p:PublishTrimmed=false -p:PublishReadyToRun=false -p:IncludeAllContentForSelfExtract=true + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false - name: Create Archives (Linux) From c8a664a87884c14662cb16551179b00682a15e10 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 16:33:22 +1000 Subject: [PATCH 21/32] Update build-tentacleping-dotnet.yml --- .../workflows/build-tentacleping-dotnet.yml | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index a98024b..1d0fb31 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -1,11 +1,12 @@ # This workflow will build a .NET project # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net -name: .NET TentaclePing +name: Build TentaclePing on: pull_request: branches: [ "main" ] + workflow_call: # This makes the workflow reusable jobs: build: @@ -44,19 +45,28 @@ jobs: - name: Create Archives (Linux) if: runner.os != 'Windows' run: | - tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish . - tar -czf TentaclePong-${{ matrix.runtime }}.tar.gz -C ./source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish . + # Create temp directory for combined archive + mkdir -p dists + cp ./source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePing dists/ + cp ./source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePong dists/ + tar -czf TentaclePing-${{ matrix.runtime }}.tar.gz -C dists . + rm -rf dists - name: Create Archives (Windows) if: runner.os == 'Windows' run: | - Compress-Archive -Path ./source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePing.exe -DestinationPath TentaclePing-${{ matrix.runtime }}.zip - Compress-Archive -Path ./source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePong.exe -DestinationPath TentaclePong-${{ matrix.runtime }}.zip + # Create temp directory for combined archive + New-Item -ItemType Directory -Path dists -Force + Copy-Item ./source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePing.exe dists/ + Copy-Item ./source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePong.exe dists/ + Compress-Archive -Path dists/* -DestinationPath TentaclePing-${{ matrix.runtime }}.zip + Remove-Item -Recurse -Force dists - name: Upload Artifacts uses: actions/upload-artifact@v4 with: name: TentaclePing-${{ matrix.runtime }} + compression-level: 0 path: | TentaclePing-${{ matrix.runtime }}.tar.gz TentaclePing-${{ matrix.runtime }}.zip From 70b7e5e3ab2435eb8ba93c4309dd1eadc2654c9d Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Tue, 2 Sep 2025 17:00:56 +1000 Subject: [PATCH 22/32] Create release-tentacleping-dotnet.yml --- .../workflows/release-tentacleping-dotnet.yml | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/release-tentacleping-dotnet.yml diff --git a/.github/workflows/release-tentacleping-dotnet.yml b/.github/workflows/release-tentacleping-dotnet.yml new file mode 100644 index 0000000..80e3269 --- /dev/null +++ b/.github/workflows/release-tentacleping-dotnet.yml @@ -0,0 +1,79 @@ +name: Create TentaclePing Release + +on: + push: + tags: + - 'v*' # Triggers the workflow when a new tag starting with 'v' is pushed + +jobs: + build: + uses: ./.github/workflows/build-tentacleping-dotnet.yml + + release: + needs: build + runs-on: ubuntu-latest + permissions: + contents: write # Grant write permission to the GITHUB_TOKEN for creating a release + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: List artifacts for debugging + run: | + find artifacts -type f -name "*.zip" | sort + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use the automatically generated GITHUB_TOKEN + with: + tag_name: ${{ github.ref_name }} + release_name: ${{ github.ref_name }} + body: | + # TentaclePing ${{ github.ref_name }} + + ## 📦 Downloads: + + ### Linux-x64**: [TentaclePing-linux-x64.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/TentaclePing-linux-x64.tar.gz) + + ### Linux-arm64**: [TentaclePing-linux-arm64.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/TentaclePing-linux-arm64.tar.gz) + + ### Windows-x64**: [TentaclePing-win-x64.zip](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/TentaclePing-win-x64.zip) + + draft: false + prerelease: false + + - name: Upload Linux x64 TentaclePing + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: artifacts/TentaclePing-linux-x64/TentaclePing-linux-x64.tar.gz + asset_name: TentaclePing-linux-x64.tar.gz + asset_content_type: application/gzip + + - name: Upload Linux ARM64 TentaclePing + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: artifacts/TentaclePing-linux-arm64/TentaclePing-linux-arm64.tar.gz + asset_name: TentaclePing-linux-arm64.tar.gz + asset_content_type: application/gzip + + - name: Upload Windows x64 TentaclePing + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: artifacts/TentaclePing-win-x64/TentaclePing-win-x64.zip + asset_name: TentaclePing-win-x64.zip + asset_content_type: application/zip From f7887be03e8a7be5a5b7abb4e8be5ec8a329ec81 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Wed, 3 Sep 2025 12:34:58 +1000 Subject: [PATCH 23/32] updated github actions --- .../workflows/build-tentacleping-dotnet.yml | 19 +++++++++++++++++-- .../workflows/release-tentacleping-dotnet.yml | 9 +-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 1d0fb31..b991f35 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -34,12 +34,27 @@ jobs: - name: Restore dependencies run: dotnet restore source/ + - name: Get version info + id: version + run: | + if [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/tags/v* ]]; then + # For tagged releases, use the tag without 'v' prefix + VERSION="${{ github.ref_name }}" + VERSION_NUMBER="${VERSION#v}" + else + # For PR builds, read VersionPrefix from project file and append dev suffix + VERSION_PREFIX=$(grep -oP '\K[^<]+' source/TentaclePing/TentaclePing.csproj || grep -oP '\K[^<]+' source/TentaclePong/TentaclePong.csproj || echo "1.0.0") + VERSION_NUMBER="${VERSION_PREFIX}-dev.${{ github.run_number }}" + fi + echo "version=$VERSION_NUMBER" >> $GITHUB_OUTPUT + echo "Building version: $VERSION_NUMBER" + - name: Build - run: dotnet build source/ --no-restore -c Release + run: dotnet build source/ --no-restore -c Release -p:Version=${{ steps.version.outputs.version }} -p:AssemblyVersion=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.version }} - name: Publish Self-Contained run: | - dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=${{ steps.version.outputs.version }} -p:AssemblyVersion=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.version }} - name: Create Archives (Linux) diff --git a/.github/workflows/release-tentacleping-dotnet.yml b/.github/workflows/release-tentacleping-dotnet.yml index 80e3269..a56a578 100644 --- a/.github/workflows/release-tentacleping-dotnet.yml +++ b/.github/workflows/release-tentacleping-dotnet.yml @@ -36,15 +36,8 @@ jobs: release_name: ${{ github.ref_name }} body: | # TentaclePing ${{ github.ref_name }} - - ## 📦 Downloads: - - ### Linux-x64**: [TentaclePing-linux-x64.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/TentaclePing-linux-x64.tar.gz) - - ### Linux-arm64**: [TentaclePing-linux-arm64.tar.gz](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/TentaclePing-linux-arm64.tar.gz) - - ### Windows-x64**: [TentaclePing-win-x64.zip](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/TentaclePing-win-x64.zip) + draft: false prerelease: false From 1985260ffde764f9d571c60c9b6acead1735ea14 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Wed, 3 Sep 2025 12:56:26 +1000 Subject: [PATCH 24/32] Update build-tentacleping-dotnet.yml --- .../workflows/build-tentacleping-dotnet.yml | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index b991f35..f83be97 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -34,28 +34,19 @@ jobs: - name: Restore dependencies run: dotnet restore source/ - - name: Get version info - id: version + - name: Build and Publish run: | if [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/tags/v* ]]; then # For tagged releases, use the tag without 'v' prefix VERSION="${{ github.ref_name }}" VERSION_NUMBER="${VERSION#v}" + dotnet build source/ --no-restore -c Release -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER else - # For PR builds, read VersionPrefix from project file and append dev suffix - VERSION_PREFIX=$(grep -oP '\K[^<]+' source/TentaclePing/TentaclePing.csproj || grep -oP '\K[^<]+' source/TentaclePong/TentaclePong.csproj || echo "1.0.0") - VERSION_NUMBER="${VERSION_PREFIX}-dev.${{ github.run_number }}" + VERSION_PREFIX=$(grep -oP '\K[^<]+' source/TentaclePing/TentaclePing.csproj) + dotnet build source/ --no-restore -c Release -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX fi - echo "version=$VERSION_NUMBER" >> $GITHUB_OUTPUT - echo "Building version: $VERSION_NUMBER" - - - name: Build - run: dotnet build source/ --no-restore -c Release -p:Version=${{ steps.version.outputs.version }} -p:AssemblyVersion=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.version }} - - - name: Publish Self-Contained - run: | - dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=${{ steps.version.outputs.version }} -p:AssemblyVersion=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.version }} - - name: Create Archives (Linux) if: runner.os != 'Windows' From 3167ff90b45269639389d367a223377a4efb599c Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Wed, 3 Sep 2025 13:02:38 +1000 Subject: [PATCH 25/32] Update build-tentacleping-dotnet.yml --- .../workflows/build-tentacleping-dotnet.yml | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index f83be97..d287264 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -34,10 +34,10 @@ jobs: - name: Restore dependencies run: dotnet restore source/ - - name: Build and Publish + - name: Build Publish and Archive (Linux) + if: runner.os != 'Windows' run: | if [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/tags/v* ]]; then - # For tagged releases, use the tag without 'v' prefix VERSION="${{ github.ref_name }}" VERSION_NUMBER="${VERSION#v}" dotnet build source/ --no-restore -c Release -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER @@ -47,10 +47,7 @@ jobs: dotnet build source/ --no-restore -c Release -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX fi - - - name: Create Archives (Linux) - if: runner.os != 'Windows' - run: | + # Create temp directory for combined archive mkdir -p dists cp ./source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePing dists/ @@ -61,6 +58,18 @@ jobs: - name: Create Archives (Windows) if: runner.os == 'Windows' run: | + if ("${{ github.event_name }}" -eq "push" -and "${{ github.ref }}" -like "refs/tags/v*") { + # For tagged releases, use the tag without 'v' prefix + $VERSION = "${{ github.ref_name }}" + $VERSION_NUMBER = $VERSION -replace '^v', '' + dotnet build source/ --no-restore -c Release -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER + } else { + $VERSION_PREFIX = (Select-String -Path "source/TentaclePing/TentaclePing.csproj" -Pattern "([^<]+)").Matches.Groups[1].Value + dotnet build source/ --no-restore -c Release -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX + } + # Create temp directory for combined archive New-Item -ItemType Directory -Path dists -Force Copy-Item ./source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePing.exe dists/ From ed3cde9fc7a90184c7941ec10790ca08ded45603 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Wed, 3 Sep 2025 13:19:28 +1000 Subject: [PATCH 26/32] Update build-tentacleping-dotnet.yml --- .github/workflows/build-tentacleping-dotnet.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index d287264..20ab2d8 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -27,16 +27,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x - - name: Restore dependencies - run: dotnet restore source/ - name: Build Publish and Archive (Linux) if: runner.os != 'Windows' run: | + dotnet restore source/ + if [ "${{ github.event_name }}" = "push" ] && [[ "${{ github.ref }}" == refs/tags/v* ]]; then VERSION="${{ github.ref_name }}" VERSION_NUMBER="${VERSION#v}" @@ -48,7 +49,6 @@ jobs: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX fi - # Create temp directory for combined archive mkdir -p dists cp ./source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePing dists/ cp ./source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePong dists/ @@ -59,7 +59,6 @@ jobs: if: runner.os == 'Windows' run: | if ("${{ github.event_name }}" -eq "push" -and "${{ github.ref }}" -like "refs/tags/v*") { - # For tagged releases, use the tag without 'v' prefix $VERSION = "${{ github.ref_name }}" $VERSION_NUMBER = $VERSION -replace '^v', '' dotnet build source/ --no-restore -c Release -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER @@ -70,7 +69,6 @@ jobs: dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX } - # Create temp directory for combined archive New-Item -ItemType Directory -Path dists -Force Copy-Item ./source/TentaclePing/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePing.exe dists/ Copy-Item ./source/TentaclePong/bin/Release/${{ matrix.framework }}/${{ matrix.runtime }}/publish/TentaclePong.exe dists/ From 2e63e2b746b3be0d673f238700510f22439448b3 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Wed, 3 Sep 2025 13:34:17 +1000 Subject: [PATCH 27/32] updated github actions --- .github/workflows/build-tentacleping-dotnet.yml | 10 +++++----- .github/workflows/release-tentacleping-dotnet.yml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-tentacleping-dotnet.yml b/.github/workflows/build-tentacleping-dotnet.yml index 20ab2d8..21bd30a 100644 --- a/.github/workflows/build-tentacleping-dotnet.yml +++ b/.github/workflows/build-tentacleping-dotnet.yml @@ -27,7 +27,7 @@ jobs: steps: - uses: actions/checkout@v4 - + - name: Setup .NET uses: actions/setup-dotnet@v4 with: @@ -42,11 +42,11 @@ jobs: VERSION="${{ github.ref_name }}" VERSION_NUMBER="${VERSION#v}" dotnet build source/ --no-restore -c Release -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER - dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER -p:PublishTrimmed=true else VERSION_PREFIX=$(grep -oP '\K[^<]+' source/TentaclePing/TentaclePing.csproj) dotnet build source/ --no-restore -c Release -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX - dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX -p:PublishTrimmed=true fi mkdir -p dists @@ -62,11 +62,11 @@ jobs: $VERSION = "${{ github.ref_name }}" $VERSION_NUMBER = $VERSION -replace '^v', '' dotnet build source/ --no-restore -c Release -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER - dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_NUMBER -p:AssemblyVersion=$VERSION_NUMBER -p:FileVersion=$VERSION_NUMBER -p:PublishTrimmed=true } else { $VERSION_PREFIX = (Select-String -Path "source/TentaclePing/TentaclePing.csproj" -Pattern "([^<]+)").Matches.Groups[1].Value dotnet build source/ --no-restore -c Release -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX - dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX + dotnet publish source/ -c Release -r ${{ matrix.runtime }} --self-contained true -f ${{ matrix.framework }} -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishSingleFile=true -p:DebugType=embedded -p:PublishReadyToRun=false -p:Version=$VERSION_PREFIX -p:AssemblyVersion=$VERSION_PREFIX -p:FileVersion=$VERSION_PREFIX -p:PublishTrimmed=true } New-Item -ItemType Directory -Path dists -Force diff --git a/.github/workflows/release-tentacleping-dotnet.yml b/.github/workflows/release-tentacleping-dotnet.yml index a56a578..583f5fd 100644 --- a/.github/workflows/release-tentacleping-dotnet.yml +++ b/.github/workflows/release-tentacleping-dotnet.yml @@ -3,7 +3,7 @@ name: Create TentaclePing Release on: push: tags: - - 'v*' # Triggers the workflow when a new tag starting with 'v' is pushed + - 'v[0-9]+.[0-9]+.[0-9]+*' jobs: build: From 5dc5a4f8214534fd72cdeb22ad0a7370cade253b Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Wed, 3 Sep 2025 13:34:45 +1000 Subject: [PATCH 28/32] Update release-tentacleping-dotnet.yml --- .github/workflows/release-tentacleping-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-tentacleping-dotnet.yml b/.github/workflows/release-tentacleping-dotnet.yml index 583f5fd..53913e7 100644 --- a/.github/workflows/release-tentacleping-dotnet.yml +++ b/.github/workflows/release-tentacleping-dotnet.yml @@ -3,7 +3,7 @@ name: Create TentaclePing Release on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+*' + - 'v[0-9]+.[0-9]+.[0-9]+-*' jobs: build: From 067b01865d3a8276a9dd0a08a5983d886acb2114 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Wed, 3 Sep 2025 13:38:25 +1000 Subject: [PATCH 29/32] Update release-tentacleping-dotnet.yml --- .github/workflows/release-tentacleping-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-tentacleping-dotnet.yml b/.github/workflows/release-tentacleping-dotnet.yml index 53913e7..79ef921 100644 --- a/.github/workflows/release-tentacleping-dotnet.yml +++ b/.github/workflows/release-tentacleping-dotnet.yml @@ -3,7 +3,7 @@ name: Create TentaclePing Release on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+-*' + - 'v[0-9]+.[0-9]+.[0-9]+' jobs: build: From f670e88651f7d8c5b4df69513298826c2c2c04ae Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Wed, 3 Sep 2025 14:09:01 +1000 Subject: [PATCH 30/32] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 2c6fead..e28a13a 100644 --- a/README.md +++ b/README.md @@ -46,3 +46,12 @@ If you don't plan to watch TentaclePing run, you may want to pipe the results to TentaclePing.exe MyServer 10933 > Output.txt This file can then easily be sent to the Octopus support team (support@octopusdeploy.com) for analysis. + + +## Contributing + +This project is managed by Github Actions. + +Create a new branch for your changes and open a PR to build assests + +Pushing a tag with the format v1.2.3 will trigger a new Release to be created \ No newline at end of file From 16e467381f57aa5888c35b0ccb86a3e5a28f74b5 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Wed, 3 Sep 2025 14:09:36 +1000 Subject: [PATCH 31/32] Update release-tentacleping-dotnet.yml --- .github/workflows/release-tentacleping-dotnet.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release-tentacleping-dotnet.yml b/.github/workflows/release-tentacleping-dotnet.yml index 79ef921..bd37e10 100644 --- a/.github/workflows/release-tentacleping-dotnet.yml +++ b/.github/workflows/release-tentacleping-dotnet.yml @@ -22,10 +22,6 @@ jobs: with: path: artifacts - - name: List artifacts for debugging - run: | - find artifacts -type f -name "*.zip" | sort - - name: Create Release id: create_release uses: actions/create-release@v1 From c0727348b39cb06d52e713f9e209f4bcace6b367 Mon Sep 17 00:00:00 2001 From: Finnian Dempsey <78527975+FinnianDempsey@users.noreply.github.com> Date: Wed, 3 Sep 2025 14:10:54 +1000 Subject: [PATCH 32/32] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e28a13a..954a6fe 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,6 @@ This file can then easily be sent to the Octopus support team (support@octopusde This project is managed by Github Actions. -Create a new branch for your changes and open a PR to build assests +Create a new branch for your changes and open a PR to main to build assests Pushing a tag with the format v1.2.3 will trigger a new Release to be created \ No newline at end of file