From 250c970042878c2c3add00cbbcf56aa9eb3f0bd9 Mon Sep 17 00:00:00 2001 From: TraceEntertains <73800394+TraceEntertains@users.noreply.github.com> Date: Sun, 1 Sep 2024 11:35:08 -0400 Subject: [PATCH 1/4] Test artifact uploading --- .github/workflows/dotnet.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6c1a12f..077ed57 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -24,3 +24,8 @@ jobs: run: dotnet restore - name: Build run: dotnet build --no-restore + - name: Upload build results + uses: actions/upload-artifact@v4 + with: + name: tns2tool_build + path: bin From a8639270bdc36139b69e24d91f120849b4076f3b Mon Sep 17 00:00:00 2001 From: TraceEntertains <73800394+TraceEntertains@users.noreply.github.com> Date: Sun, 1 Sep 2024 11:36:43 -0400 Subject: [PATCH 2/4] Artifact upload test 2 --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 077ed57..e9bc132 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -27,5 +27,5 @@ jobs: - name: Upload build results uses: actions/upload-artifact@v4 with: - name: tns2tool_build - path: bin + name: tns2tool_build_artifact + path: ./tns2tool/bin From 2c40ed654d5c81c25ce06f9c037dfd4f8811141e Mon Sep 17 00:00:00 2001 From: TraceEntertains <73800394+TraceEntertains@users.noreply.github.com> Date: Sun, 1 Sep 2024 11:50:41 -0400 Subject: [PATCH 3/4] New workflow system --- .github/workflows/dotnet.yml | 77 ++++++++++++++++++++++++++---------- 1 file changed, 57 insertions(+), 20 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index e9bc132..fb00bf7 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -5,27 +5,64 @@ name: .NET on: push: - branches: [ "main" ] + branches: + - main pull_request: - branches: [ "main" ] + branches: + - main jobs: - build: + Build: + runs-on: ${{ matrix.OS_BUILD_PLATFORM }} - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 6.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --no-restore - - name: Upload build results - uses: actions/upload-artifact@v4 - with: - name: tns2tool_build_artifact - path: ./tns2tool/bin + strategy: + matrix: + os: [ubuntu-latest, macOS-latest, windows-latest] + configuration: [Debug, Release] + include: + - os: ubuntu-latest + OS_NAME: Linux x64 + DOTNET_RUNTIME_IDENTIFIER: linux-x64 + RELEASE_ZIP_OS_NAME: linux_x64 + OS_BUILD_PLATFORM: ubuntu-latest + + - os: macOS-latest + OS_NAME: macOS x64 + DOTNET_RUNTIME_IDENTIFIER: osx-x64 + RELEASE_ZIP_OS_NAME: osx_x64 + OS_BUILD_PLATFORM: ubuntu-latest + + - os: windows-latest + OS_NAME: Windows x64 + DOTNET_RUNTIME_IDENTIFIER: win-x64 + RELEASE_ZIP_OS_NAME: win_x64 + OS_BUILD_PLATFORM: windows-latest + + - configuration: Debug + BUILD_CONFIGURATION_NAME: debug + + - configuration: Release + BUILD_CONFIGURATION_NAME: release + + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 6.0.x + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --no-restore + + - name: Publish + run: dotnet publish -c "${{ matrix.configuration }}" -r ${{ matrix.DOTNET_RUNTIME_IDENTIFIER }} --output ./publish --no-restore + + - name: Upload build results + uses: actions/upload-artifact@v4 + with: + name: tns2tool_${{ matrix.RELEASE_ZIP_OS_NAME }}-${{ matrix.BUILD_CONFIGURATION_NAME }} + path: publish From 5234092342e2b0fda87245433533a2b94c82ea28 Mon Sep 17 00:00:00 2001 From: TraceEntertains <73800394+TraceEntertains@users.noreply.github.com> Date: Sun, 1 Sep 2024 11:51:42 -0400 Subject: [PATCH 4/4] Set .NET version in workflow to 8 --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index fb00bf7..17be704 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -50,7 +50,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore