-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernized build with GitHub actions (#13)
* Modernized build with GitHub actions * Fixed xplat builds * Update deps * Fixed build errors * Changed license file extension so dotnet pack works * skip packaging
- Loading branch information
Showing
14 changed files
with
178 additions
and
95 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,28 @@ | ||
name: Build Linux | ||
on: [push, pull_request] | ||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.x | ||
- name: Build Reason | ||
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}" | ||
- name: Build Version | ||
shell: bash | ||
run: | | ||
dotnet tool install --global minver-cli --version 2.5.0 | ||
version=$(minver --tag-prefix v) | ||
echo "MINVERVERSIONOVERRIDE=$version" >> $GITHUB_ENV | ||
- name: Build | ||
run: dotnet build --configuration Release Serilog.Sinks.Exceptionless.sln | ||
- name: Run Tests | ||
run: dotnet test --configuration Release --no-build Serilog.Sinks.Exceptionless.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Build OSX | ||
on: [push, pull_request] | ||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
jobs: | ||
build: | ||
runs-on: macOS-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.x | ||
- name: Build Reason | ||
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}" | ||
- name: Build Version | ||
shell: bash | ||
run: | | ||
dotnet tool install --global minver-cli --version 2.5.0 | ||
version=$(minver --tag-prefix v) | ||
echo "MINVERVERSIONOVERRIDE=$version" >> $GITHUB_ENV | ||
- name: Build | ||
run: dotnet build --configuration Release Serilog.Sinks.Exceptionless.sln | ||
- name: Run Tests | ||
run: dotnet test --configuration Release --no-build Serilog.Sinks.Exceptionless.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build Windows | ||
on: [push, pull_request] | ||
env: | ||
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.x | ||
- name: Build Reason | ||
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}" | ||
- name: Build Version | ||
shell: bash | ||
run: | | ||
dotnet tool install --global minver-cli --version 2.5.0 | ||
version=$(minver --tag-prefix v) | ||
echo "MINVERVERSIONOVERRIDE=$version" >> $GITHUB_ENV | ||
- name: Build | ||
run: dotnet build --configuration Release Serilog.Sinks.Exceptionless.sln | ||
- name: Run Tests | ||
run: dotnet test --configuration Release --no-build Serilog.Sinks.Exceptionless.sln | ||
- name: Package | ||
if: github.event_name != 'pull_request' | ||
run: dotnet pack --configuration Release --no-build Serilog.Sinks.Exceptionless.sln | ||
- name: Install GitHub Package Tool | ||
if: github.event_name != 'pull_request' | ||
run: dotnet tool install gpr -g | ||
- name: Publish CI Packages | ||
shell: bash | ||
if: github.event_name != 'pull_request' | ||
run: | | ||
for package in $(find -name "*.nupkg" | grep "minver" -v); do | ||
echo "${0##*/}": Pushing $package... | ||
# GitHub | ||
gpr push $package -k ${{ secrets.GITHUB_TOKEN }} || true | ||
done | ||
- name: Publish Release Packages | ||
shell: bash | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: | | ||
for package in $(find -name "*.nupkg" | grep "minver" -v); do | ||
echo "${0##*/}": Pushing $package... | ||
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate | ||
done |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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 was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,12 +1,13 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFrameworks>net452;net50</TargetFrameworks> | ||
<TargetFrameworks>net50</TargetFrameworks> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Serilog.Sinks.Exceptionless\Serilog.Sinks.Exceptionless.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /> | ||
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.0" /> | ||
</ItemGroup> | ||
</Project> |
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,4 +1,3 @@ | ||
using System; | ||
using System.Reflection; | ||
|
||
[assembly: CLSCompliant(true)] |
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