forked from xperiandri/StringBuilderExtensions
-
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 xperiandri/workflows
Workflows
- Loading branch information
Showing
9 changed files
with
368 additions
and
229 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,33 @@ | ||
name: .NET Core | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 2.1.607 | ||
|
||
- name: Restore NuGet Packages | ||
run: dotnet restore StringBuilderExtensions.sln | ||
|
||
- name: Build with dotnet | ||
run: | | ||
DOTNET_CLI_TELEMETRY_OPTOUT=1 | ||
msbuild StringBuilderExtensions.sln /p:Configuration=Release | ||
- name: Run Unit Tests | ||
run: | | ||
cd StringBuilderExtensionsTests | ||
dotnet run -c Release --no-build |
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,25 @@ | ||
name: publish to MyGet | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
- name: Build with dotnet | ||
run: | | ||
sed -i "s|<Version>\(.*\)</Version>|<Version>\1-ci-$GITHUB_RUN_ID</Version>|" StringBuilderExtensions\StringBuilderExtensions.csproj | ||
dotnet pack --nologo --configuration Release -o nuget | ||
- name: MyGet push | ||
run: | | ||
source=https://www.myget.org/F/xperiandri/api/v3/index.json | ||
key=${{secrets.MyGet_Key}} | ||
dotnet nuget push -s $source -k $key nuget/*.nupkg |
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,32 @@ | ||
name: publish to NuGet | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest | ||
# Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest | ||
# - name: Setup dotnet | ||
# uses: actions/setup-dotnet@v1 | ||
# with: | ||
# dotnet-version: 3.1.100 | ||
|
||
# Publish | ||
- name: publish on version change | ||
uses: rohith/publish-nuget@v2 | ||
with: | ||
PROJECT_FILE_PATH: StringBuilderExtensions\StringBuilderExtensions.csproj # Relative to repository root | ||
# VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file | ||
# VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group | ||
# TAG_COMMIT: true # Flag to enable / disalge git tagging | ||
# TAG_FORMAT: v* # Format of the git tag, [*] gets replaced with version | ||
NUGET_KEY: ${{secrets.NuGet_Key}} |
Oops, something went wrong.