-
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.
Refactor create release step and add publish to nuget step
- Loading branch information
1 parent
fac6c87
commit 4faef45
Showing
5 changed files
with
83 additions
and
13 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,36 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
DOTNET_NOLOGO: true | ||
|
||
jobs: | ||
push_to_nuget: | ||
name: Push to NuGet Feed | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Source | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.release.target_commitish }} | ||
|
||
- name: Download release assets | ||
uses: Itsblue/download-release-assets-action@master | ||
with: | ||
repo: ${{ env.GITHUB_REPOSITORY }} | ||
version: ${{ github.event.release.id }} | ||
file: "Sknet.*" | ||
path: ./artifacts | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push assets to NuGet | ||
env: | ||
NuGet_Source: ${{ secrets.NUGET_SOURCE }} | ||
NuGet_ApiKey: ${{ secrets.NUGET_APIKEY }} | ||
run: ./build.sh --target PublishToNuGetFeed --skip PublishArtifacts |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
static class StringExtensions | ||
{ | ||
public static (string T1, string T2) Split(this string value, char separator) | ||
{ | ||
var result = value.Split(separator, 2, StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries); | ||
|
||
return (result[0], result.Length > 1 ? result[1] : string.Empty); | ||
} | ||
} |