Skip to content

Commit

Permalink
remake publish on release
Browse files Browse the repository at this point in the history
  • Loading branch information
oxffaa committed Jan 8, 2021
1 parent cf42e09 commit 1373dbc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Publish on push tags on master
name: Publish package on release

on:
push:
tags:
- 'v*'
release:
types: [published]

jobs:
build:
Expand Down
3 changes: 1 addition & 2 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,10 @@ class Build : NukeBuild
Target Publish => _ => _
.DependsOn(Pack)
.Consumes(Pack)
.OnlyWhenStatic(() => GitHasCleanWorkingCopy())
.OnlyWhenDynamic(() => GitCurrentBranch() == "master")
.Requires(() => NugetApiKey)
.Requires(() => NugetFeed)
.Requires(() => Configuration.Equals(Configuration.Release))
.Requires(() => GitHasCleanWorkingCopy())
.Executes(() =>
{
DotNetNuGetPush(_ => _
Expand Down
3 changes: 3 additions & 0 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<None Update="..\.github\workflows\master-build-and-test.yml">
<Link>ci\master-build-and-test.yml</Link>
</None>
<None Update="..\.github\workflows\publish-on-release.yml">
<Link>ci\publish-on-release.yml</Link>
</None>
</ItemGroup>

</Project>

0 comments on commit 1373dbc

Please sign in to comment.