diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 684b4f9..5255fa1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,7 @@ jobs: job: - os: windows-2019 build: ./build.cmd + push: true - os: windows-2022 build: ./build.cmd name: ${{ matrix.job.os }} @@ -44,3 +45,10 @@ jobs: fetch-depth: 0 - name: Build run: ${{ matrix.job.build }} --verbosity=diagnostic --target=pack + - name: Publish artifacts + if: matrix.job.push && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) + uses: actions/upload-artifact@v2.2.4 + with: + if-no-files-found: warn + name: package + path: artifact/nuget/**/* diff --git a/.gitignore b/.gitignore index 9ed1307..3960115 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,4 @@ Thumbs.db #cake .cake/ -/artifacts/* +/artifact/* diff --git a/build.cake b/build.cake index c8b0ccd..cdb8926 100644 --- a/build.cake +++ b/build.cake @@ -9,7 +9,7 @@ var buildVersion = MinVer(s => s.WithTagPrefix("v").WithDefaultPreReleasePhase(" Task("clean") .Does(() => { - CleanDirectories("./artifacts/**"); + CleanDirectories("./artifact/**"); CleanDirectories("./packages/**"); CleanDirectories("./**/^{bin,obj}"); }); @@ -69,7 +69,7 @@ Task("pack") NoBuild = true, IncludeSymbols = true, IncludeSource = true, - OutputDirectory = "./artifacts/nuget", + OutputDirectory = "./artifact/nuget", MSBuildSettings = new DotNetCoreMSBuildSettings() .WithProperty("Version", buildVersion.Version) .WithProperty("PackageReleaseNotes", releaseNotes) @@ -100,7 +100,7 @@ Task("push") ApiKey = apiKey, }; - foreach (var nugetPackageFile in GetFiles("./artifacts/nuget/*.nupkg")) + foreach (var nugetPackageFile in GetFiles("./artifact/nuget/*.nupkg")) { DotNetCoreNuGetPush(nugetPackageFile.FullPath, nugetPushSettings); }