-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start supporting OkTools.Terminal as a package
- Loading branch information
1 parent
76c2bc1
commit f3b7bb8
Showing
9 changed files
with
88 additions
and
7 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
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,33 @@ | ||
name: Publish NuGet Package | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: [ release-terminal-* ] | ||
|
||
# TODO: trigger on commit desc '/publish' | ||
# TODO: switch to https://github.com/xoofx/dotnet-releaser | ||
|
||
jobs: | ||
publish: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Setup .NET | ||
uses: actions/[email protected] | ||
with: | ||
dotnet-version: 8.0.x | ||
|
||
- name: Run tests | ||
run: | | ||
dotnet test --nologo -l:"console;verbosity=normal" src\Terminal\Terminal-Tests.csproj -c Release | ||
- name: Pack nuget | ||
run: dotnet pack src\Terminal\Terminal.csproj -c Release | ||
|
||
- name: Publish NuGet package | ||
run: | | ||
dotnet nuget push publish\Terminal\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json |
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
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,13 +1,17 @@ | ||
# Publishing OkTools.Core | ||
# Publishing | ||
|
||
Do this: | ||
## OkTools.Core | ||
|
||
* Edit `Core.csproj` and bump the `PackageVersion` | ||
* `dotnet build src/Core/Core.csproj --nologo -c Release && dotnet test src/Core/Core-Tests.csproj --nologo` | ||
* Run `pre-publish.ps1 -Core` to build and test. | ||
* Send it to GitHub | ||
* `git commit/reset` and get to a clean state | ||
* `git push`, wait for https://github.com/scottbilas/OkTools/actions to be green (this runs the "Validate Dev Branch" action) | ||
* `git tag release-$version` where `$version` is what was set in the .csproj above | ||
* `git tag release-core-$version` where `$version` is what was set in the .csproj above | ||
* `git push --tags` (this runs the "Publish NuGet Package" action) | ||
|
||
If there are no errors, publishing the new version to the Nuget Gallery should happen in about 5 minutes. | ||
|
||
## OkTools.Terminal | ||
|
||
Same as OkTools.Core except replace Core with Terminal and use tag release-terminal-$version. |
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,27 @@ | ||
[CmdletBinding()] | ||
param ( | ||
[switch]$Core, | ||
[switch]$Terminal) | ||
|
||
$rc = 0 | ||
|
||
if ($Core) { | ||
"*** BUILDING CORE ***" | ||
dotnet build src/Core/Core.csproj -c Release --nologo | ||
if (!$LASTEXITCODE) { | ||
dotnet test src/Core/Core-Tests.csproj --nologo | ||
} | ||
if ($LASTEXITCODE) { $rc = 1 } | ||
"" | ||
} | ||
|
||
if ($Terminal) { | ||
dotnet build src/Terminal/Terminal.csproj -c Release --nologo | ||
if (!$LASTEXITCODE) { | ||
dotnet test src/Terminal/Terminal-Tests.csproj --nologo | ||
} | ||
if ($LASTEXITCODE) { $rc = 1 } | ||
"" | ||
} | ||
|
||
exit $rc |
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,3 +1,6 @@ | ||
# OkTools.Core | ||
|
||
Some OK core utilities. | ||
|
||
Important: I'm not yet following semver or worrying about API breakage. Every | ||
single release is potentially breaking. |
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,3 +1,6 @@ | ||
# OkTools.Terminal | ||
|
||
Some OK utilities for the terminal. | ||
|
||
Important: I'm not yet following semver or worrying about API breakage. Every | ||
single release is potentially breaking. |
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