Skip to content

Commit

Permalink
Publish only on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lahma committed Nov 11, 2024
1 parent 54db7b5 commit f5772b1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 31 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ jobs:
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
- name: 'Publish: test-results'
uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: test-results
path: artifacts/test-results
- name: 'Publish: packages'
uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: packages
path: artifacts/packages
Expand All @@ -60,11 +62,13 @@ jobs:
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
- name: 'Publish: test-results'
uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: test-results
path: artifacts/test-results
- name: 'Publish: packages'
uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: packages
path: artifacts/packages
64 changes: 35 additions & 29 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"Configuration": {
"type": "string",
"enum": [
"Debug",
"Release"
]
},
"IgnoreFailedSources": {
"type": "boolean",
"description": "Ignore unreachable sources during Restore"
},
"MyGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"NuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"NuGetSource": {
"type": "string"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
},
"definitions": {
"Host": {
"type": "string",
Expand Down Expand Up @@ -128,5 +100,39 @@
}
}
},
"$ref": "#/definitions/NukeBuild"
"allOf": [
{
"properties": {
"Configuration": {
"type": "string",
"enum": [
"Debug",
"Release"
]
},
"IgnoreFailedSources": {
"type": "boolean",
"description": "Ignore unreachable sources during Restore"
},
"MyGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"NuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
},
"NuGetSource": {
"type": "string"
},
"Solution": {
"type": "string",
"description": "Path to a solution file that is automatically loaded"
}
}
},
{
"$ref": "#/definitions/NukeBuild"
}
]
}
6 changes: 4 additions & 2 deletions build/Build.CI.GitHubActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
PublishArtifacts = false,
CacheKeyFiles = [],
InvokedTargets = [nameof(ICompile.Compile), nameof(ITest.Test), nameof(IPack.Pack)],
ConcurrencyCancelInProgress = true)
ConcurrencyCancelInProgress = true,
PublishCondition = "runner.os == 'Windows'")
]
[GitHubActions(
"build",
Expand All @@ -24,6 +25,7 @@
PublishArtifacts = true,
CacheKeyFiles = [],
InvokedTargets = [nameof(ICompile.Compile), nameof(ITest.Test), nameof(IPack.Pack), nameof(Publish)],
ImportSecrets = ["NUGET_API_KEY", "MYGET_API_KEY"])
ImportSecrets = ["NUGET_API_KEY", "MYGET_API_KEY"],
PublishCondition = "runner.os == 'Windows'")
]
public partial class Build;

0 comments on commit f5772b1

Please sign in to comment.