-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffd970c
commit beba5d5
Showing
21 changed files
with
548 additions
and
101 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,22 +1,37 @@ | ||
name: Build | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
# ------------------------------------------------------------------------------ | ||
# <auto-generated> | ||
# | ||
# This code was generated. | ||
# | ||
# - To turn off auto-generation set: | ||
# | ||
# [GitHubActions (AutoGenerate = false)] | ||
# | ||
# - To trigger manual generation invoke: | ||
# | ||
# nuke --generate-configuration GitHubActions_build --host GitHubActions | ||
# | ||
# </auto-generated> | ||
# ------------------------------------------------------------------------------ | ||
|
||
env: | ||
buildConfiguration: 'Release' | ||
workingDirectory: 'src' | ||
name: build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-ci: | ||
windows-latest: | ||
name: windows-latest | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/build-and-test | ||
with: | ||
buildConfiguration: ${{ env.buildConfiguration }} | ||
workingDirectory: ${{ env.workingDirectory }} | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 50 | ||
- name: 'Cache: .nuke/temp, ~/.nuget/packages' | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.nuke/temp | ||
~/.nuget/packages | ||
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} | ||
- name: 'Run: Compile' | ||
run: ./build.cmd Compile |
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 |
---|---|---|
@@ -1,32 +1,42 @@ | ||
name: Publish | ||
# ------------------------------------------------------------------------------ | ||
# <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: | ||
- 'v*.*.*' | ||
|
||
env: | ||
buildConfiguration: 'Release' | ||
workingDirectory: 'src' | ||
|
||
jobs: | ||
deploy: | ||
windows-latest: | ||
name: windows-latest | ||
runs-on: windows-latest | ||
environment: production | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/build-and-test | ||
id: build-and-test | ||
fetch-depth: 50 | ||
- name: 'Cache: .nuke/temp, ~/.nuget/packages' | ||
uses: actions/cache@v4 | ||
with: | ||
buildConfiguration: ${{ env.buildConfiguration }} | ||
workingDirectory: ${{ env.workingDirectory }} | ||
|
||
- name: Pack | ||
run: dotnet pack --configuration Release --no-build --output artifacts | ||
working-directory: src | ||
|
||
- name: Push with dotnet | ||
run: dotnet nuget push artifacts\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | ||
working-directory: src | ||
path: | | ||
.nuke/temp | ||
~/.nuget/packages | ||
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} | ||
- name: 'Run: Publish' | ||
run: ./build.cmd Publish | ||
env: | ||
NuGetApiKey: ${{ secrets.NUGET_API_KEY }} |
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,2 @@ | ||
artifacts/ | ||
.nuke/temp |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,124 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"definitions": { | ||
"Host": { | ||
"type": "string", | ||
"enum": [ | ||
"AppVeyor", | ||
"AzurePipelines", | ||
"Bamboo", | ||
"Bitbucket", | ||
"Bitrise", | ||
"GitHubActions", | ||
"GitLab", | ||
"Jenkins", | ||
"Rider", | ||
"SpaceAutomation", | ||
"TeamCity", | ||
"Terminal", | ||
"TravisCI", | ||
"VisualStudio", | ||
"VSCode" | ||
] | ||
}, | ||
"ExecutableTarget": { | ||
"type": "string", | ||
"enum": [ | ||
"Clean", | ||
"Compile", | ||
"Pack", | ||
"Publish", | ||
"Restore", | ||
"Test" | ||
] | ||
}, | ||
"Verbosity": { | ||
"type": "string", | ||
"description": "", | ||
"enum": [ | ||
"Verbose", | ||
"Normal", | ||
"Minimal", | ||
"Quiet" | ||
] | ||
}, | ||
"NukeBuild": { | ||
"properties": { | ||
"Continue": { | ||
"type": "boolean", | ||
"description": "Indicates to continue a previously failed build attempt" | ||
}, | ||
"Help": { | ||
"type": "boolean", | ||
"description": "Shows the help text for this build assembly" | ||
}, | ||
"Host": { | ||
"description": "Host for execution. Default is 'automatic'", | ||
"$ref": "#/definitions/Host" | ||
}, | ||
"NoLogo": { | ||
"type": "boolean", | ||
"description": "Disables displaying the NUKE logo" | ||
}, | ||
"Partition": { | ||
"type": "string", | ||
"description": "Partition to use on CI" | ||
}, | ||
"Plan": { | ||
"type": "boolean", | ||
"description": "Shows the execution plan (HTML)" | ||
}, | ||
"Profile": { | ||
"type": "array", | ||
"description": "Defines the profiles to load", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"Root": { | ||
"type": "string", | ||
"description": "Root directory during build execution" | ||
}, | ||
"Skip": { | ||
"type": "array", | ||
"description": "List of targets to be skipped. Empty list skips all dependencies", | ||
"items": { | ||
"$ref": "#/definitions/ExecutableTarget" | ||
} | ||
}, | ||
"Target": { | ||
"type": "array", | ||
"description": "List of targets to be invoked. Default is '{default_target}'", | ||
"items": { | ||
"$ref": "#/definitions/ExecutableTarget" | ||
} | ||
}, | ||
"Verbosity": { | ||
"description": "Logging verbosity during build execution. Default is 'Normal'", | ||
"$ref": "#/definitions/Verbosity" | ||
} | ||
} | ||
} | ||
}, | ||
"allOf": [ | ||
{ | ||
"properties": { | ||
"Configuration": { | ||
"type": "string", | ||
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)", | ||
"enum": [ | ||
"Debug", | ||
"Release" | ||
] | ||
}, | ||
"NuGetApiKey": { | ||
"type": "string", | ||
"default": "Secrets must be entered via 'nuke :secrets [profile]'" | ||
} | ||
} | ||
}, | ||
{ | ||
"$ref": "#/definitions/NukeBuild" | ||
} | ||
] | ||
} |
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,4 @@ | ||
{ | ||
"$schema": "build.schema.json", | ||
"Solution": "src/Mairegger.Printing.sln" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
:; set -eo pipefail | ||
:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) | ||
:; ${SCRIPT_DIR}/build.sh "$@" | ||
:; exit $? | ||
|
||
@ECHO OFF | ||
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %* |
Oops, something went wrong.