From bd0b1b1bb7008a6ef683a63e8acd63b046620df9 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 13:19:29 +0200 Subject: [PATCH 01/35] added default workflow --- .github/workflows/branches.yml | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/branches.yml diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml new file mode 100644 index 0000000..e63b198 --- /dev/null +++ b/.github/workflows/branches.yml @@ -0,0 +1,53 @@ +name: Branch workflow +on: + push: + branches-ignore: + - master + pull_request: +env: + DOTNET_CLI_TELEMETRY_OPTOUT: true + MSBUILDSINGLELOADCONTEXT: 1 +jobs: + generateVersionInfo: + name: GenerateVersionInfo + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Restore dotnet tools + run: dotnet tool restore + - name: Fetch complete repository including tags + run: git fetch --tags --force --prune && git describe + - name: Generate version info from git history + run: dotnet gitversion /output json > gitversion.json && cat gitversion.json + - name: Upload version info file + uses: actions/upload-artifact@v1 + with: + name: gitversion + path: gitversion.json + + build: + name: Build + needs: generateVersionInfo + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Download version info file + uses: actions/download-artifact@v1 + with: + name: gitversion + path: ./ + - name: Inject version info into environment + run: jq -r 'to_entries|map("::set-env name=GitVersion_\(.key)::\(.value|tostring)")|.[]' gitversion.json + - name: Build solution + run: echo "Current version is \"$GitVersion_SemVer\"" && dotnet build -c Release + - name: Create NuGet packages + run: dotnet pack -c Release --no-build -o nupkg + - name: Upload nuget packages + uses: actions/upload-artifact@v1 + with: + name: nupkg + path: nupkg \ No newline at end of file From 7e75069b6725e0ec9057114deb57f9bf84e68883 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 13:26:53 +0200 Subject: [PATCH 02/35] deleted gitversionjob --- .github/workflows/branches.yml | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index e63b198..b24de55 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -7,26 +7,6 @@ on: env: DOTNET_CLI_TELEMETRY_OPTOUT: true MSBUILDSINGLELOADCONTEXT: 1 -jobs: - generateVersionInfo: - name: GenerateVersionInfo - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Restore dotnet tools - run: dotnet tool restore - - name: Fetch complete repository including tags - run: git fetch --tags --force --prune && git describe - - name: Generate version info from git history - run: dotnet gitversion /output json > gitversion.json && cat gitversion.json - - name: Upload version info file - uses: actions/upload-artifact@v1 - with: - name: gitversion - path: gitversion.json build: name: Build @@ -35,13 +15,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Download version info file - uses: actions/download-artifact@v1 - with: - name: gitversion - path: ./ - - name: Inject version info into environment - run: jq -r 'to_entries|map("::set-env name=GitVersion_\(.key)::\(.value|tostring)")|.[]' gitversion.json + - name: Restore dotnet tools + run: dotnet tool restore - name: Build solution run: echo "Current version is \"$GitVersion_SemVer\"" && dotnet build -c Release - name: Create NuGet packages From b043b8791113393c634e30ebf67256ef736002f3 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 13:28:27 +0200 Subject: [PATCH 03/35] fixed yaml syntax --- .github/workflows/branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index b24de55..6509f14 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -16,7 +16,7 @@ env: - name: Checkout uses: actions/checkout@v2 - name: Restore dotnet tools - run: dotnet tool restore + run: dotnet tool restore - name: Build solution run: echo "Current version is \"$GitVersion_SemVer\"" && dotnet build -c Release - name: Create NuGet packages From cab86811d5535837b3d250f2723af1d2815885d4 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 13:29:27 +0200 Subject: [PATCH 04/35] added job --- .github/workflows/branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 6509f14..5e168fd 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -7,7 +7,7 @@ on: env: DOTNET_CLI_TELEMETRY_OPTOUT: true MSBUILDSINGLELOADCONTEXT: 1 - +jobs: build: name: Build needs: generateVersionInfo From e7d6c83402830375c698ed4a8909370f18b91eed Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 13:30:13 +0200 Subject: [PATCH 05/35] removed dependency --- .github/workflows/branches.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 5e168fd..40d8f44 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -10,7 +10,6 @@ env: jobs: build: name: Build - needs: generateVersionInfo runs-on: ubuntu-latest steps: - name: Checkout From ec643de1809515101bee0eed5911a214e63de284 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 13:34:07 +0200 Subject: [PATCH 06/35] moved sln file in root dir --- .github/workflows/branches.yml | 2 +- src/NLogViewer.sln => NLogViewer.sln | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) rename src/NLogViewer.sln => NLogViewer.sln (72%) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 40d8f44..6e91f71 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -17,7 +17,7 @@ jobs: - name: Restore dotnet tools run: dotnet tool restore - name: Build solution - run: echo "Current version is \"$GitVersion_SemVer\"" && dotnet build -c Release + run: dotnet build -c Release - name: Create NuGet packages run: dotnet pack -c Release --no-build -o nupkg - name: Upload nuget packages diff --git a/src/NLogViewer.sln b/NLogViewer.sln similarity index 72% rename from src/NLogViewer.sln rename to NLogViewer.sln index 4ad2bc3..730cffc 100644 --- a/src/NLogViewer.sln +++ b/NLogViewer.sln @@ -3,17 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29609.76 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NLogViewer.TestApp", "NLogViewer.TestApp\NLogViewer.TestApp.csproj", "{FF15C180-042C-42D9-8687-24F1BEB5F4FB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NLogViewer.TestApp", "src\NLogViewer.TestApp\NLogViewer.TestApp.csproj", "{FF15C180-042C-42D9-8687-24F1BEB5F4FB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NLogViewer", "NLogViewer\NLogViewer.csproj", "{D1C5763C-DA9C-43E0-B7EA-DDC9AAA90AE7}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2E975FF9-26E0-49F1-B10A-CFCDE832B0EE}" - ProjectSection(SolutionItems) = preProject - ..\Directory.build.props = ..\Directory.build.props - ..\GitVersion.yml = ..\GitVersion.yml - ..\LICENSE.md = ..\LICENSE.md - ..\README.md = ..\README.md - EndProjectSection +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NLogViewer", "src\NLogViewer\NLogViewer.csproj", "{D1C5763C-DA9C-43E0-B7EA-DDC9AAA90AE7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution From 65f44ef6ffdaf0383183ec18f386d236fe998719 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 13:36:29 +0200 Subject: [PATCH 07/35] uses windows as vm --- .github/workflows/branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 6e91f71..ea86d46 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -10,7 +10,7 @@ env: jobs: build: name: Build - runs-on: ubuntu-latest + runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v2 From 89e6eca2c9378c6b2d8c3321922873265ce55fef Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 13:39:16 +0200 Subject: [PATCH 08/35] updated gitversiontask --- src/NLogViewer/NLogViewer.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NLogViewer/NLogViewer.csproj b/src/NLogViewer/NLogViewer.csproj index 5d3572a..e5c8c29 100644 --- a/src/NLogViewer/NLogViewer.csproj +++ b/src/NLogViewer/NLogViewer.csproj @@ -73,7 +73,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From c9a73cc62d367b39f1d816272c1f94938f03cbda Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 13:42:34 +0200 Subject: [PATCH 09/35] removed dotnet restore tools; aded fetch depth --- .github/workflows/branches.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index ea86d46..ca4c70b 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -14,8 +14,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Restore dotnet tools - run: dotnet tool restore + with: + fetch-depth: 0 - name: Build solution run: dotnet build -c Release - name: Create NuGet packages From 1f36ec708d9681ccc534f1eaa9669bb6d6dcd184 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 14:00:11 +0200 Subject: [PATCH 10/35] only pack NLogViewer project --- .github/workflows/branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index ca4c70b..43b5d23 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -19,7 +19,7 @@ jobs: - name: Build solution run: dotnet build -c Release - name: Create NuGet packages - run: dotnet pack -c Release --no-build -o nupkg + run: dotnet pack "src/NLogViewer" --no-build -o nupkg - name: Upload nuget packages uses: actions/upload-artifact@v1 with: From 4ab7aefdcac7bab97867b61f75d91b0f3e41354b Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 14:33:30 +0200 Subject: [PATCH 11/35] removed create nuget package; just copy the existing from build --- .github/workflows/branches.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 43b5d23..d08849f 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -18,10 +18,10 @@ jobs: fetch-depth: 0 - name: Build solution run: dotnet build -c Release - - name: Create NuGet packages - run: dotnet pack "src/NLogViewer" --no-build -o nupkg + - name: Fetch NuGet packages + run: mkdir -p nuget && cp src\NLogViewer\bin\Release\*.nupkg nuget\ - name: Upload nuget packages - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 with: name: nupkg path: nupkg \ No newline at end of file From 9b110da9d66bbaffc8062860f2af9eb40e5ccc46 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 14:37:12 +0200 Subject: [PATCH 12/35] refactoring; moved copy statement into new line --- .github/workflows/branches.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index d08849f..5909d45 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -18,9 +18,10 @@ jobs: fetch-depth: 0 - name: Build solution run: dotnet build -c Release - - name: Fetch NuGet packages - run: mkdir -p nuget && cp src\NLogViewer\bin\Release\*.nupkg nuget\ - - name: Upload nuget packages + - name: Fetch nuget packages + run: mkdir -p nuget + cp src\NLogViewer\bin\Release\*.nupkg nuget\ + - name: Upload nuget packages as artifacts uses: actions/upload-artifact@v2 with: name: nupkg From d77bbb20b4c6b47c4c8e61cd56c7932eb89fd0e4 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 14:40:17 +0200 Subject: [PATCH 13/35] added pipe in run --- .github/workflows/branches.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 5909d45..249eae1 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -19,8 +19,9 @@ jobs: - name: Build solution run: dotnet build -c Release - name: Fetch nuget packages - run: mkdir -p nuget - cp src\NLogViewer\bin\Release\*.nupkg nuget\ + run: | + mkdir -p nuget + cp src\NLogViewer\bin\Release\*.nupkg nuget\ - name: Upload nuget packages as artifacts uses: actions/upload-artifact@v2 with: From c3697f3f1a722f85b58effb21e5827022b3beedb Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 14:47:26 +0200 Subject: [PATCH 14/35] fixed path for uploading artifacts --- .github/workflows/branches.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 249eae1..f1307b8 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -21,9 +21,10 @@ jobs: - name: Fetch nuget packages run: | mkdir -p nuget - cp src\NLogViewer\bin\Release\*.nupkg nuget\ + copy src\NLogViewer\bin\Release\*.nupkg nuget\ - name: Upload nuget packages as artifacts uses: actions/upload-artifact@v2 with: name: nupkg - path: nupkg \ No newline at end of file + path: nuget + if-no-files-found: error \ No newline at end of file From aa9261b0da4078495d1e2358fca440a47506592c Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 15:10:46 +0200 Subject: [PATCH 15/35] added publish stage --- .github/workflows/branches.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index f1307b8..e75c2da 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -27,4 +27,22 @@ jobs: with: name: nupkg path: nuget - if-no-files-found: error \ No newline at end of file + if-no-files-found: error + +publish: + name: Publish + needs: [build] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Download nuget artifacts + uses: actions/download-artifact@v2 + with: + name: nupkg + - name: Publish the package to GitHub Packages + run: | + dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text + dotnet nuget push **/*.nupkg --source github \ No newline at end of file From f14c28020296346d3a632dfe089eeab762ab1cdf Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 15:14:02 +0200 Subject: [PATCH 16/35] fixed syntax --- .github/workflows/branches.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index e75c2da..4fb3413 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -35,14 +35,14 @@ publish: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 + uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Download nuget artifacts - uses: actions/download-artifact@v2 - with: + uses: actions/download-artifact@v2 + with: name: nupkg - name: Publish the package to GitHub Packages - run: | + run: | dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text dotnet nuget push **/*.nupkg --source github \ No newline at end of file From 547312c188b7e180f18c38f613a0c624b9721eda Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Thu, 8 Oct 2020 15:15:25 +0200 Subject: [PATCH 17/35] fix syntax --- .github/workflows/branches.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index 4fb3413..d8031cc 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -29,7 +29,7 @@ jobs: path: nuget if-no-files-found: error -publish: + publish: name: Publish needs: [build] runs-on: ubuntu-latest From 4fd0662f03eb7e5460a2646ae6697c0af717c162 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 07:09:49 +0200 Subject: [PATCH 18/35] removed publish on branch workflow, added pre-release workflow with manual trigger --- .github/workflows/pre-release.yml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/pre-release.yml diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml new file mode 100644 index 0000000..53a0757 --- /dev/null +++ b/.github/workflows/pre-release.yml @@ -0,0 +1,38 @@ +name: publish pre-release workflow +on: [workflow_dispatch] +env: + DOTNET_CLI_TELEMETRY_OPTOUT: true + MSBUILDSINGLELOADCONTEXT: 1 +jobs: + build: + name: Build + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build solution + run: dotnet build -c Release + - name: Fetch nuget packages + run: | + mkdir -p nuget + copy src\NLogViewer\bin\Release\*.nupkg nuget\ + - name: Upload nuget packages as artifacts + uses: actions/upload-artifact@v2 + with: + name: nupkg + path: nuget + if-no-files-found: error + + # publish: + # name: Publish + # needs: [build] + # runs-on: ubuntu-latest + # steps: + # - name: Download nuget artifacts + # uses: actions/download-artifact@v2 + # with: + # name: nupkg + # - name: Publish the package to GitHub Packages + # run: | + # dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text + # dotnet nuget push **/*.nupkg --source github \ No newline at end of file From 3a654e040c0bdf389b3dac13dc840a44400f434c Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 07:18:01 +0200 Subject: [PATCH 19/35] nothing changed, just empty commit --- .github/workflows/pre-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 53a0757..5f94330 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -35,4 +35,6 @@ jobs: # - name: Publish the package to GitHub Packages # run: | # dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text - # dotnet nuget push **/*.nupkg --source github \ No newline at end of file + # dotnet nuget push **/*.nupkg --source github + + \ No newline at end of file From 23f7829912899a92f4dfa3388299b3cbbb4ba94a Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 07:21:48 +0200 Subject: [PATCH 20/35] removed publish from branch.yml; added fetch depth to build checkout --- .github/workflows/branches.yml | 20 +------------------- .github/workflows/pre-release.yml | 3 ++- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml index d8031cc..f1307b8 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/branches.yml @@ -27,22 +27,4 @@ jobs: with: name: nupkg path: nuget - if-no-files-found: error - - publish: - name: Publish - needs: [build] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Download nuget artifacts - uses: actions/download-artifact@v2 - with: - name: nupkg - - name: Publish the package to GitHub Packages - run: | - dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text - dotnet nuget push **/*.nupkg --source github \ No newline at end of file + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 5f94330..fd943ef 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -10,6 +10,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Build solution run: dotnet build -c Release - name: Fetch nuget packages @@ -37,4 +39,3 @@ jobs: # dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text # dotnet nuget push **/*.nupkg --source github - \ No newline at end of file From f1c2318289ceb60575d34ec3cdee4ede79c3f099 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 07:30:48 +0200 Subject: [PATCH 21/35] empty commit --- .github/workflows/pre-release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index fd943ef..fc03c6d 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -38,4 +38,3 @@ jobs: # run: | # dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text # dotnet nuget push **/*.nupkg --source github - From c9a401f50dd0553d2320ddd29033440e43922bbc Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 07:58:26 +0200 Subject: [PATCH 22/35] renamed workflows; added branch name to checkout in pre release --- .github/workflows/{branches.yml => commit.yml} | 2 +- .github/workflows/pre-release.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{branches.yml => commit.yml} (96%) diff --git a/.github/workflows/branches.yml b/.github/workflows/commit.yml similarity index 96% rename from .github/workflows/branches.yml rename to .github/workflows/commit.yml index f1307b8..5737eab 100644 --- a/.github/workflows/branches.yml +++ b/.github/workflows/commit.yml @@ -1,4 +1,4 @@ -name: Branch workflow +name: Commit on: push: branches-ignore: diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index fc03c6d..eff0247 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -1,4 +1,4 @@ -name: publish pre-release workflow +name: publish pre-release on: [workflow_dispatch] env: DOTNET_CLI_TELEMETRY_OPTOUT: true @@ -11,7 +11,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - fetch-depth: 0 + ref: ${GITHUB_HEAD_REF} - name: Build solution run: dotnet build -c Release - name: Fetch nuget packages From f55e025c87f416ca969ced977807767ee9481e17 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 07:59:39 +0200 Subject: [PATCH 23/35] fix --- .github/workflows/pre-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index eff0247..90a6c46 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -11,7 +11,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - ref: ${GITHUB_HEAD_REF} + ref: $GITHUB_REF - name: Build solution run: dotnet build -c Release - name: Fetch nuget packages From e2c1ffa5406d51a8363d57937423f1a94de0909e Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 08:20:04 +0200 Subject: [PATCH 24/35] changed syntax --- .github/workflows/pre-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 90a6c46..772df15 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -11,7 +11,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - ref: $GITHUB_REF + ref: ${GITHUB_REF} - name: Build solution run: dotnet build -c Release - name: Fetch nuget packages From 92ade35612c5359825ee0fec8e23e642327c5a8e Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 08:22:36 +0200 Subject: [PATCH 25/35] fix again --- .github/workflows/pre-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 772df15..d69fc24 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -11,7 +11,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - ref: ${GITHUB_REF} + ref: ${{ github.ref }} - name: Build solution run: dotnet build -c Release - name: Fetch nuget packages From a27c13b7db4945baf8e5dc78ad6bd4c8f90d556a Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 08:27:28 +0200 Subject: [PATCH 26/35] readded fetch depth --- .github/workflows/pre-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index d69fc24..54efafd 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -11,6 +11,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: + fetch-depth: 0 ref: ${{ github.ref }} - name: Build solution run: dotnet build -c Release From f8f6aaf1e4f8f56fa1eff433e31c8c5b10a19b55 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 09:16:57 +0200 Subject: [PATCH 27/35] added nuget.org as deploy job --- .github/workflows/pre-release.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 54efafd..490c574 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -26,16 +26,18 @@ jobs: path: nuget if-no-files-found: error - # publish: - # name: Publish - # needs: [build] - # runs-on: ubuntu-latest - # steps: - # - name: Download nuget artifacts - # uses: actions/download-artifact@v2 - # with: - # name: nupkg - # - name: Publish the package to GitHub Packages - # run: | - # dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text - # dotnet nuget push **/*.nupkg --source github + publish: + name: Publish + needs: [build] + runs-on: ubuntu-latest + steps: + - name: Download nuget artifacts + uses: actions/download-artifact@v2 + with: + name: nupkg + - name: Publish the package to GitHub Packages + run: | + dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text + dotnet nuget add source https://api.nuget.org/v3/index.json --name nuget --api-key ${{ secrets.NUGET_API_KEY }} + dotnet nuget push **/*.nupkg --source github + dotnet nuget push **/*.nupkg --source nuget From 64758c1ec7afb2cda45453f00c0ac94f833903fd Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 09:17:18 +0200 Subject: [PATCH 28/35] changed name --- .github/workflows/pre-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 490c574..b811401 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -35,7 +35,7 @@ jobs: uses: actions/download-artifact@v2 with: name: nupkg - - name: Publish the package to GitHub Packages + - name: Publish the package to GitHub Packages & nuget.org run: | dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text dotnet nuget add source https://api.nuget.org/v3/index.json --name nuget --api-key ${{ secrets.NUGET_API_KEY }} From ead7855a6425ea7ca96e755f37a73eafca174ee4 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 09:20:47 +0200 Subject: [PATCH 29/35] removed MSBUILDSINGLELOADCONTEXT --- .github/workflows/branches.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/pre-release.yml | 1 - 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/branches.yml diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml new file mode 100644 index 0000000..f062526 --- /dev/null +++ b/.github/workflows/branches.yml @@ -0,0 +1,29 @@ +name: Commit +on: + push: + branches-ignore: + - master + pull_request: +env: + DOTNET_CLI_TELEMETRY_OPTOUT: true +jobs: + build: + name: Build + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Build solution + run: dotnet build -c Release + - name: Fetch nuget packages + run: | + mkdir -p nuget + copy src\NLogViewer\bin\Release\*.nupkg nuget\ + - name: Upload nuget packages as artifacts + uses: actions/upload-artifact@v2 + with: + name: nupkg + path: nuget + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index b811401..c3721bc 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -2,7 +2,6 @@ name: publish pre-release on: [workflow_dispatch] env: DOTNET_CLI_TELEMETRY_OPTOUT: true - MSBUILDSINGLELOADCONTEXT: 1 jobs: build: name: Build From 7045cbf6ee35eaadb569de48b620040bd2e1258f Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 09:45:45 +0200 Subject: [PATCH 30/35] fixed nuget push call --- .github/workflows/pre-release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index c3721bc..19b15cb 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -37,6 +37,5 @@ jobs: - name: Publish the package to GitHub Packages & nuget.org run: | dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text - dotnet nuget add source https://api.nuget.org/v3/index.json --name nuget --api-key ${{ secrets.NUGET_API_KEY }} dotnet nuget push **/*.nupkg --source github - dotnet nuget push **/*.nupkg --source nuget + dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} \ No newline at end of file From f41092afb169137a419addf1d7d48ef948e3442b Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Fri, 9 Oct 2020 10:24:23 +0200 Subject: [PATCH 31/35] delete branches yml --- .github/workflows/branches.yml | 29 ----------------------------- .github/workflows/commit.yml | 1 - 2 files changed, 30 deletions(-) delete mode 100644 .github/workflows/branches.yml diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml deleted file mode 100644 index f062526..0000000 --- a/.github/workflows/branches.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Commit -on: - push: - branches-ignore: - - master - pull_request: -env: - DOTNET_CLI_TELEMETRY_OPTOUT: true -jobs: - build: - name: Build - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Build solution - run: dotnet build -c Release - - name: Fetch nuget packages - run: | - mkdir -p nuget - copy src\NLogViewer\bin\Release\*.nupkg nuget\ - - name: Upload nuget packages as artifacts - uses: actions/upload-artifact@v2 - with: - name: nupkg - path: nuget - if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 5737eab..f062526 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -6,7 +6,6 @@ on: pull_request: env: DOTNET_CLI_TELEMETRY_OPTOUT: true - MSBUILDSINGLELOADCONTEXT: 1 jobs: build: name: Build From 8a306ad5043a669d0c84c186a7f70d64a50b53dd Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Mon, 12 Oct 2020 10:45:30 +0200 Subject: [PATCH 32/35] added folder in download nuget artifacts, added tag workflow --- .github/workflows/pre-release.yml | 5 ++- .github/workflows/release.yml | 67 +++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index 19b15cb..fac2627 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -34,8 +34,9 @@ jobs: uses: actions/download-artifact@v2 with: name: nupkg + path: nuget - name: Publish the package to GitHub Packages & nuget.org run: | dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text - dotnet nuget push **/*.nupkg --source github - dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} \ No newline at end of file + dotnet nuget push ./nuget/*.nupkg --source github + dotnet nuget push ./nuget/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4fea144 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,67 @@ +name: Release +on: + push: + branches-ignore: + - master + pull_request: +env: + DOTNET_CLI_TELEMETRY_OPTOUT: true + jobs: + build: + name: Build + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Build solution + run: dotnet build -c Release + - name: Fetch nuget packages + run: | + mkdir -p nuget + copy src\NLogViewer\bin\Release\*.nupkg nuget\ + - name: Upload nuget packages as artifacts + uses: actions/upload-artifact@v2 + with: + name: nupkg + path: nuget + if-no-files-found: error + publish: + name: Publish + needs: [build] + runs-on: ubuntu-latest + steps: + - name: Download nuget artifacts + uses: actions/download-artifact@v2 + with: + name: nupkg + path: nuget + - name: Get release + id: get_release + uses: bruceadams/get-release@v1.2.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload artifacts to release + uses: actions/github-script@v3 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const path = require('path'); + const fs = require('fs'); + const release_id = '${{ steps.get_release.outputs.id }}'; + for (let file of await fs.readdirSync('./nuget')) { + console.log('uploadReleaseAsset', file); + await github.repos.uploadReleaseAsset({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: release_id, + name: file, + data: await fs.readFileSync(`./nuget/${file}`) + }); + } + - name: Publish the package to GitHub Packages & nuget.org + run: | + dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text + dotnet nuget push ./nuget/*.nupkg --source github + dotnet nuget push ./nuget/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} \ No newline at end of file From a9f5dbf69a0f21af89b743ed3a91ef0fc6cf7638 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Mon, 12 Oct 2020 10:46:33 +0200 Subject: [PATCH 33/35] fixed push condition in release.yml --- .github/workflows/release.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4fea144..d0b798d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,8 @@ name: Release -on: +on: push: - branches-ignore: - - master - pull_request: + tags: + - '*' env: DOTNET_CLI_TELEMETRY_OPTOUT: true jobs: From 821c7cb1c0ea80aadaff9a9f9e2f3504bb4a27fc Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Mon, 12 Oct 2020 10:52:40 +0200 Subject: [PATCH 34/35] fixed syntax in release.yml --- .github/workflows/release.yml | 118 +++++++++++++++++----------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d0b798d..cfe834e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,62 +5,62 @@ on: - '*' env: DOTNET_CLI_TELEMETRY_OPTOUT: true - jobs: - build: - name: Build - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Build solution - run: dotnet build -c Release - - name: Fetch nuget packages - run: | - mkdir -p nuget - copy src\NLogViewer\bin\Release\*.nupkg nuget\ - - name: Upload nuget packages as artifacts - uses: actions/upload-artifact@v2 - with: - name: nupkg - path: nuget - if-no-files-found: error - publish: - name: Publish - needs: [build] - runs-on: ubuntu-latest - steps: - - name: Download nuget artifacts - uses: actions/download-artifact@v2 - with: - name: nupkg - path: nuget - - name: Get release - id: get_release - uses: bruceadams/get-release@v1.2.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload artifacts to release - uses: actions/github-script@v3 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const path = require('path'); - const fs = require('fs'); - const release_id = '${{ steps.get_release.outputs.id }}'; - for (let file of await fs.readdirSync('./nuget')) { - console.log('uploadReleaseAsset', file); - await github.repos.uploadReleaseAsset({ - owner: context.repo.owner, - repo: context.repo.repo, - release_id: release_id, - name: file, - data: await fs.readFileSync(`./nuget/${file}`) - }); - } - - name: Publish the package to GitHub Packages & nuget.org - run: | - dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text - dotnet nuget push ./nuget/*.nupkg --source github - dotnet nuget push ./nuget/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} \ No newline at end of file +jobs: + build: + name: Build + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Build solution + run: dotnet build -c Release + - name: Fetch nuget packages + run: | + mkdir -p nuget + copy src\NLogViewer\bin\Release\*.nupkg nuget\ + - name: Upload nuget packages as artifacts + uses: actions/upload-artifact@v2 + with: + name: nupkg + path: nuget + if-no-files-found: error + publish: + name: Publish + needs: [build] + runs-on: ubuntu-latest + steps: + - name: Download nuget artifacts + uses: actions/download-artifact@v2 + with: + name: nupkg + path: nuget + - name: Get release + id: get_release + uses: bruceadams/get-release@v1.2.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload artifacts to release + uses: actions/github-script@v3 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const path = require('path'); + const fs = require('fs'); + const release_id = '${{ steps.get_release.outputs.id }}'; + for (let file of await fs.readdirSync('./nuget')) { + console.log('uploadReleaseAsset', file); + await github.repos.uploadReleaseAsset({ + owner: context.repo.owner, + repo: context.repo.repo, + release_id: release_id, + name: file, + data: await fs.readFileSync(`./nuget/${file}`) + }); + } + - name: Publish the package to GitHub Packages & nuget.org + run: | + dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text + dotnet nuget push ./nuget/*.nupkg --source github + dotnet nuget push ./nuget/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} \ No newline at end of file From 7cd480d34ab94faad0c7375ea279be9396e59c01 Mon Sep 17 00:00:00 2001 From: Dominic Jonas Date: Mon, 12 Oct 2020 10:54:57 +0200 Subject: [PATCH 35/35] removed ignore master from commit.yml --- .github/workflows/commit.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index f062526..d7e9f5c 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -1,8 +1,6 @@ name: Commit on: push: - branches-ignore: - - master pull_request: env: DOTNET_CLI_TELEMETRY_OPTOUT: true