From 611d95c7ba41c76ea3dfaffaee9f6d8b3ee2373c Mon Sep 17 00:00:00 2001 From: breadbyte Date: Wed, 16 Jun 2021 01:47:27 +0800 Subject: [PATCH 1/7] Create dotnet.yml --- .github/workflows/dotnet.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..9bf1fc5 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,24 @@ +name: .NET + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + From e764df80ab674925bba9f28ab98effda54ed88c8 Mon Sep 17 00:00:00 2001 From: breadbyte Date: Wed, 16 Jun 2021 01:53:30 +0800 Subject: [PATCH 2/7] test artifact upload --- .github/workflows/dotnet.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9bf1fc5..a48ab78 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -21,4 +21,6 @@ jobs: run: dotnet restore - name: Build run: dotnet build --configuration Release --no-restore + - name: Upload Artifact + uses: actions/upload-artifact@v2 From 96acb18a0441f769feb305ce910c1f56ba6d9231 Mon Sep 17 00:00:00 2001 From: breadbyte Date: Wed, 16 Jun 2021 01:57:59 +0800 Subject: [PATCH 3/7] test artifact path --- .github/workflows/dotnet.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index a48ab78..a052078 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -23,4 +23,6 @@ jobs: run: dotnet build --configuration Release --no-restore - name: Upload Artifact uses: actions/upload-artifact@v2 - + with: + name: artifact + path: /home/runner/work/patch1337-to-cpp/patch1337-to-cpp/patch1337tocpp/bin/Release/net5.0/ From bf3032012037dba2c26c95c8d60052e950402b93 Mon Sep 17 00:00:00 2001 From: breadbyte Date: Wed, 16 Jun 2021 02:02:50 +0800 Subject: [PATCH 4/7] update dotnet build to dotnet publish --- .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 a052078..7612cd5 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -19,8 +19,8 @@ jobs: dotnet-version: 5.0.x - name: Restore dependencies run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore + - name: Create Binaries for win10 + run: dotnet publish -c Release -r win10-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true - name: Upload Artifact uses: actions/upload-artifact@v2 with: From 966f6eeab26274b472a2ef660faa37b222a751f9 Mon Sep 17 00:00:00 2001 From: breadbyte Date: Wed, 16 Jun 2021 02:34:55 +0800 Subject: [PATCH 5/7] upload publish artifacts --- .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 7612cd5..19de8e1 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,4 +25,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: artifact - path: /home/runner/work/patch1337-to-cpp/patch1337-to-cpp/patch1337tocpp/bin/Release/net5.0/ + path: /home/runner/work/patch1337-to-cpp/patch1337-to-cpp/patch1337tocpp/bin/Release/net5.0/win10-x64/publish From a5280d83229e66dbf92b442796d7d6c9420c4b9a Mon Sep 17 00:00:00 2001 From: breadbyte Date: Wed, 16 Jun 2021 02:58:43 +0800 Subject: [PATCH 6/7] create linux and win10 binaries --- .github/workflows/dotnet.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 19de8e1..7623423 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -19,10 +19,17 @@ jobs: dotnet-version: 5.0.x - name: Restore dependencies run: dotnet restore - - name: Create Binaries for win10 - run: dotnet publish -c Release -r win10-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true - - name: Upload Artifact + - name: Create Binary - win10 + run: dotnet publish --no-restore -c Release -r win10-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true + - name: Create Binary - linux + run: dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true + - name: Upload Windows 10 Artifacts uses: actions/upload-artifact@v2 with: - name: artifact + name: artifact-win path: /home/runner/work/patch1337-to-cpp/patch1337-to-cpp/patch1337tocpp/bin/Release/net5.0/win10-x64/publish + - name: Upload Linux Artifacts + uses: actions/upload-artifact@v2 + with: + name: artifact-linux + path: /home/runner/work/patch1337-to-cpp/patch1337-to-cpp/patch1337tocpp/bin/Release/net5.0/linux-x64/publish From a4aa7f4af3573de409add2e669c793aa1875ddae Mon Sep 17 00:00:00 2001 From: breadbyte Date: Wed, 16 Jun 2021 02:59:44 +0800 Subject: [PATCH 7/7] remove no-restore option on win10 --- .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 7623423..a0fa32f 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -20,7 +20,7 @@ jobs: - name: Restore dependencies run: dotnet restore - name: Create Binary - win10 - run: dotnet publish --no-restore -c Release -r win10-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true + run: dotnet publish -c Release -r win10-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true - name: Create Binary - linux run: dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true - name: Upload Windows 10 Artifacts