-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from digitalrmdy/feature/open_source_preparation
open source preparation
- Loading branch information
Showing
17 changed files
with
153 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# ------------------------------------------------------------------------------ | ||
# <auto-generated> | ||
# | ||
# This code was generated. | ||
# | ||
# - To turn off auto-generation set: | ||
# | ||
# [GitHubActions (AutoGenerate = false)] | ||
# | ||
# - To trigger manual generation invoke: | ||
# | ||
# nuke --generate-configuration GitHubActions_pr --host GitHubActions | ||
# | ||
# </auto-generated> | ||
# ------------------------------------------------------------------------------ | ||
|
||
name: pr | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
ubuntu-latest: | ||
name: ubuntu-latest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: 'Run: Pack' | ||
run: ./build.cmd Pack | ||
- name: 'Publish: artifacts' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifacts | ||
path: artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# ------------------------------------------------------------------------------ | ||
# <auto-generated> | ||
# | ||
# This code was generated. | ||
# | ||
# - To turn off auto-generation set: | ||
# | ||
# [GitHubActions (AutoGenerate = false)] | ||
# | ||
# - To trigger manual generation invoke: | ||
# | ||
# nuke --generate-configuration GitHubActions_publish --host GitHubActions | ||
# | ||
# </auto-generated> | ||
# ------------------------------------------------------------------------------ | ||
|
||
name: publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
jobs: | ||
ubuntu-latest: | ||
name: ubuntu-latest | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: 'Run: Publish' | ||
run: ./build.cmd Publish | ||
env: | ||
NugetApiKey: ${{ secrets.NUGET_API_KEY }} | ||
- name: 'Publish: artifacts' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifacts | ||
path: artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Nuke.Common.CI.GitHubActions; | ||
|
||
[GitHubActions( | ||
"pr", | ||
GitHubActionsImage.UbuntuLatest, | ||
On = [GitHubActionsTrigger.PullRequest], | ||
InvokedTargets = [nameof(Pack)], | ||
AutoGenerate = false, | ||
FetchDepth = 0, | ||
CacheKeyFiles = [])] | ||
[GitHubActions( | ||
"publish", | ||
GitHubActionsImage.UbuntuLatest, | ||
InvokedTargets = [nameof(Publish)], | ||
AutoGenerate = false, | ||
FetchDepth = 0, | ||
CacheKeyFiles = [], | ||
OnPushTags = ["'*.*.*'"], | ||
ImportSecrets = [nameof(NugetApiKey)])] | ||
partial class Build; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System.Collections.Generic; | ||
using Nuke.Common; | ||
using Nuke.Common.CI.AzurePipelines; | ||
using Nuke.Common.IO; | ||
using Nuke.Common.Tooling; | ||
using Nuke.Common.Tools.DotNet; | ||
using Nuke.Common.Utilities.Collections; | ||
using Serilog; | ||
using static Nuke.Common.Tools.DotNet.DotNetTasks; | ||
|
||
partial class Build | ||
{ | ||
[Secret, Parameter] string NugetApiKey; | ||
[Parameter] string NugetSource = "https://api.nuget.org/v3/index.json"; | ||
|
||
Target PublishToNugetOrg => _ => _ | ||
.DependsOn(Pack) | ||
.Requires(() => NugetSource) | ||
.Requires(() => NugetApiKey) | ||
.Executes(() => | ||
{ | ||
IEnumerable<AbsolutePath> artifactPackages = ArtifactsDirectory.GlobFiles("*.nupkg"); | ||
if (artifactPackages.IsNullOrEmpty()) | ||
{ | ||
Log.Warning("No packages found to push to NuGet.org"); | ||
return; | ||
} | ||
|
||
artifactPackages.ForEach(x => | ||
{ | ||
Log.Information("Pushing {Path} to NuGet.org", x); | ||
DotNetNuGetPush(s => s | ||
.SetSource(NugetSource) | ||
.SetApiKey(NugetApiKey) | ||
.SetTargetPath(x)); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.