-
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.
- Loading branch information
1 parent
81b87e6
commit 16ab097
Showing
11 changed files
with
1,208 additions
and
0 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 @@ | ||
name: "Deploy project to NuGet" | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
env: | ||
PROJECT_PATH: 'Serilog.Enrichers.pm4net/Serilog.Enrichers.pm4net.csproj' | ||
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output | ||
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json' | ||
|
||
jobs: | ||
deploy: | ||
name: 'Deploy' | ||
runs-on: 'windows-latest' | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v2 | ||
|
||
- name: 'Restore packages' | ||
run: dotnet restore ${{ env.PROJECT_PATH }} | ||
|
||
- name: 'Build project' | ||
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore | ||
|
||
- name: 'Get Version' | ||
id: version | ||
uses: battila7/get-version-action@v2 | ||
|
||
- name: 'Pack project' | ||
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} | ||
|
||
- name: 'Push package' | ||
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg -k ${{ secrets.NUGET_AUTH_TOKEN }} -s ${{ env.NUGET_SOURCE_URL }} --skip-duplicate |
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,34 @@ | ||
name: "Build and Run Tests" | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ master ] | ||
paths-ignore: | ||
- '**/README.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
dotnet-version: ['6.0.x'] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET SDK ${{ matrix.dotnet-version }} | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ matrix.dotnet-version }} | ||
- name: Install dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build --configuration Release | ||
- name: Test | ||
run: dotnet test --no-restore --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}" | ||
- name: Upload dotnet test results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dotnet-results-${{ matrix.dotnet-version }} | ||
path: TestResults-${{ matrix.dotnet-version }} | ||
# Use always() to always run this step to publish test results when there are test failures | ||
if: ${{ always() }} |
Oops, something went wrong.