Skip to content

Commit 94d1a70

Browse files
authored
Merge pull request #10 from DecSmith42/chore/release-filter
chore: Add filter to release job
2 parents 49054e3 + 1d80657 commit 94d1a70

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/Build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ jobs:
110110
PushToRelease:
111111
needs: [ PackFileLogging, SetupBuildInfo ]
112112
runs-on: ubuntu-latest
113+
if: contains(needs.SetupBuildInfo.outputs.build-version, '-') == false
113114
steps:
114115

115116
- name: Checkout

_atom/Build.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ internal partial class Build : DefaultBuildDefinition, IGithubWorkflows, IGitVer
4343
})
4444
.WithOptions(GithubRunsOn.SetByMatrix),
4545
Targets.PushToNuget.WithOptions(WorkflowSecretInjection.Create(Params.NugetApiKey)),
46-
Targets.PushToRelease.WithGithubTokenInjection(),
46+
Targets
47+
.PushToRelease
48+
.WithGithubTokenInjection()
49+
.WithOptions(GithubIf.Create(new ConsumedVariableExpression(nameof(Targets.SetupBuildInfo),
50+
ParamDefinitions[nameof(ISetupBuildInfo.BuildVersion)].ArgName)
51+
.Contains(new StringExpression("-"))
52+
.EqualTo("false"))),
4753
],
4854
WorkflowTypes = [Github.WorkflowType],
4955
},

0 commit comments

Comments
 (0)