Skip to content

Commit 2a15aaa

Browse files
committed
Update to latest build / CI process
1 parent e3b14bf commit 2a15aaa

File tree

12 files changed

+145
-143
lines changed

12 files changed

+145
-143
lines changed

.github/workflows/build.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build
2+
on: [push, pull_request]
3+
env:
4+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v1
11+
with:
12+
fetch-depth: 0
13+
- name: Setup .NET Core
14+
uses: actions/setup-dotnet@v1
15+
with:
16+
dotnet-version: 3.1.100
17+
- name: Build Reason
18+
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}"
19+
- name: Build Version
20+
id: version
21+
uses: thefringeninja/action-minver@2.0.0-preview1
22+
with:
23+
tag-prefix: v
24+
- name: Build
25+
run: dotnet build --configuration Release
26+
- name: Run Tests
27+
run: dotnet test --configuration Release --results-directory artifacts --no-build --logger:trx
28+
- name: Package
29+
if: github.event_name != 'pull_request'
30+
run: dotnet pack --configuration Release --no-build
31+
- name: Publish CI Packages
32+
run: |
33+
for package in $(find -name "*.nupkg" | grep "minver" -v); do
34+
echo "${0##*/}": Pushing $package...
35+
36+
# GPR
37+
# workaround for GPR push issue
38+
curl -sX PUT -u "foundatiofx:${{ secrets.GITHUB_TOKEN }}" -F package=@$package https://nuget.pkg.github.com/foundatiofx/
39+
40+
# feedz (remove once GPR supports anonymous access)
41+
dotnet nuget push $package --source https://f.feedz.io/foundatio/foundatio/nuget --api-key ${{ secrets.FEEDZ_KEY }}
42+
done
43+
- name: Publish Release Packages
44+
if: startsWith(github.ref, 'refs/tags/v')
45+
run: |
46+
for package in $(find -name "*.nupkg" | grep "minver" -v); do
47+
echo "${0##*/}": Pushing $package...
48+
dotnet nuget push $package --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }}
49+
done
50+
- name: Upload Artifacts
51+
uses: actions/upload-artifact@v1.0.0
52+
with:
53+
name: artifacts
54+
path: artifacts

.vscode/tasks.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"command": "dotnet",
7+
"type": "process",
8+
"group": {
9+
"kind": "build",
10+
"isDefault": true
11+
},
12+
"args": [
13+
"build",
14+
"${workspaceFolder}",
15+
"/p:GenerateFullPaths=true"
16+
],
17+
"problemMatcher": "$msCompile"
18+
},
19+
{
20+
"label": "test",
21+
"command": "dotnet",
22+
"type": "process",
23+
"group": {
24+
"kind": "test",
25+
"isDefault": true
26+
},
27+
"args": [
28+
"test",
29+
"${workspaceFolder}",
30+
"/p:GenerateFullPaths=true"
31+
],
32+
"problemMatcher": "$msCompile"
33+
},
34+
{
35+
"label": "pack",
36+
"command": "dotnet pack -c Release -o ${workspaceFolder}/artifacts",
37+
"type": "shell",
38+
"problemMatcher": []
39+
}
40+
]
41+
}

LICENSE renamed to LICENSE.txt

File renamed without changes.

appveyor.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

build/Clean.ps1

Lines changed: 0 additions & 16 deletions
This file was deleted.
File renamed without changes.

build/Set-BuildVersion.ps1

Lines changed: 0 additions & 13 deletions
This file was deleted.

build/common.props

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<Project>
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<Product>Exceptionless RandomData Generator</Product>
6+
<Description>Exceptionless RandomData Generator</Description>
7+
<PackageProjectUrl>https://github.com/exceptionless/Exceptionless.RandomData</PackageProjectUrl>
8+
<PackageReleaseNotes>https://github.com/exceptionless/Exceptionless.RandomData/releases</PackageReleaseNotes>
9+
<PackageTags>Random;Data;Generator;Test</PackageTags>
10+
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
11+
<MinVerTagPrefix>v</MinVerTagPrefix>
12+
13+
<Copyright>Copyright (c) 2020 Exceptionless. All rights reserved.</Copyright>
14+
<Authors>Exceptionless</Authors>
15+
<NoWarn>$(NoWarn);CS1591;NU1701</NoWarn>
16+
<WarningsAsErrors>true</WarningsAsErrors>
17+
<LangVersion>latest</LangVersion>
18+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
19+
<PackageOutputPath>$(SolutionDir)artifacts</PackageOutputPath>
20+
<PackageIcon>exceptionless-icon.png</PackageIcon>
21+
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
22+
<RepositoryUrl>$(PackageProjectUrl)</RepositoryUrl>
23+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
24+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
25+
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
26+
</PropertyGroup>
27+
28+
<PropertyGroup Label="Signing">
29+
<SignAssembly>true</SignAssembly>
30+
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Exceptionless.snk</AssemblyOriginatorKeyFile>
31+
</PropertyGroup>
32+
33+
<ItemGroup>
34+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
35+
<PackageReference Include="AsyncFixer" Version="1.1.6" PrivateAssets="All" />
36+
<PackageReference Include="MinVer" Version="2.0.0" PrivateAssets="All" />
37+
</ItemGroup>
38+
39+
<ItemGroup>
40+
<None Include="../../LICENSE.txt" Pack="true" Visible="false" PackagePath="$(PackageLicenseFile)" />
41+
<None Include="../../build/exceptionless-icon.png" Pack="true" PackagePath="$(PackageIcon)" />
42+
</ItemGroup>
43+
44+
</Project>

build/exceptionless-icon.png

3.67 KB
Loading

build/version.props

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,3 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\..\build\version.props" />
3-
4-
<PropertyGroup>
5-
<TargetFramework>netstandard2.0</TargetFramework>
6-
<Product>Exceptionless RandomData Generator</Product>
7-
<Description>Exceptionless RandomData Generator</Description>
8-
<Copyright>Copyright (c) 2017 Exceptionless. All rights reserved.</Copyright>
9-
<Authors>bniemyjski;ejsmith</Authors>
10-
<NoWarn>$(NoWarn);CS1591</NoWarn>
11-
<WarningsAsErrors>true</WarningsAsErrors>
12-
<DebugType>portable</DebugType>
13-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
14-
<PackageOutputPath>$(SolutionDir)artifacts\</PackageOutputPath>
15-
16-
<PackageReleaseNotes>https://github.com/exceptionless/Exceptionless.RandomData/releases</PackageReleaseNotes>
17-
<PackageIconUrl>https://be.exceptionless.io/img/exceptionless-32.png</PackageIconUrl>
18-
<PackageProjectUrl>https://github.com/exceptionless/Exceptionless.RandomData</PackageProjectUrl>
19-
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
20-
<RepositoryType>git</RepositoryType>
21-
<RepositoryUrl>https://github.com/exceptionless/Exceptionless.RandomData</RepositoryUrl>
22-
<VersionSuffix Condition="'$(VersionSuffix)'!='' AND '$(BuildNumber)' != ''">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
23-
</PropertyGroup>
24-
25-
<PropertyGroup Label="Signing">
26-
<SignAssembly>true</SignAssembly>
27-
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
28-
<AssemblyOriginatorKeyFile>..\..\Exceptionless.snk</AssemblyOriginatorKeyFile>
29-
</PropertyGroup>
30-
31-
<ItemGroup>
32-
<PackageReference Include="SourceLink.Create.GitHub" Version="2.8.3" PrivateAssets="all" />
33-
<DotNetCliToolReference Include="dotnet-sourcelink-git" Version="2.1.2" />
34-
<DotNetCliToolReference Include="dotnet-sourcelink" Version="2.1.2" />
35-
</ItemGroup>
2+
<Import Project="..\..\build\common.props" />
363
</Project>
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="..\..\build\common.props" />
23
<PropertyGroup>
3-
<TargetFramework>netcoreapp2.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
45
<IsPackable>False</IsPackable>
56
</PropertyGroup>
67
<ItemGroup>
78
<ProjectReference Include="..\..\src\Exceptionless.RandomData\Exceptionless.RandomData.csproj" />
89
</ItemGroup>
9-
10-
<PropertyGroup Label="Signing">
11-
<SignAssembly>true</SignAssembly>
12-
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
13-
<AssemblyOriginatorKeyFile>..\..\Exceptionless.snk</AssemblyOriginatorKeyFile>
14-
</PropertyGroup>
15-
1610
<ItemGroup>
17-
<PackageReference Include="Foundatio.Logging.Xunit" Version="9.0.0" />
18-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
1912
<PackageReference Include="xunit" Version="2.4.1" />
2013
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
21-
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-beta4-build3742" />
14+
<PackageReference Include="Foundatio.Logging.Xunit" Version="9.0.0" />
2215
</ItemGroup>
23-
</Project>
16+
</Project>

0 commit comments

Comments
 (0)