Skip to content

Commit

Permalink
Update GH build to publish artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
augustoproiete committed Sep 19, 2021
1 parent f73d7af commit dfe171f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
job:
- os: windows-2019
build: ./build.cmd
push: true
- os: windows-2022
build: ./build.cmd
name: ${{ matrix.job.os }}
Expand All @@ -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/**/*
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Thumbs.db

#cake
.cake/
/artifacts/*
/artifact/*
6 changes: 3 additions & 3 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var buildVersion = MinVer(s => s.WithTagPrefix("v").WithDefaultPreReleasePhase("
Task("clean")
.Does(() =>
{
CleanDirectories("./artifacts/**");
CleanDirectories("./artifact/**");
CleanDirectories("./packages/**");
CleanDirectories("./**/^{bin,obj}");
});
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit dfe171f

Please sign in to comment.