Skip to content

Commit acf70b7

Browse files
committed
Change build configuration a bit
Add Github actions to release to nuget and remove the old scripts
1 parent 38eecca commit acf70b7

File tree

7 files changed

+153
-65
lines changed

7 files changed

+153
-65
lines changed

.github/workflows/generic-build.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: Generic build
22

3-
on:
4-
push:
3+
on: [push]
54

65
jobs:
76
build:
@@ -12,6 +11,8 @@ jobs:
1211
- name: Setup .NET Core 5.0
1312
uses: actions/setup-dotnet@v1
1413
with:
15-
dotnet-version: '5.0.100'
16-
- name: Build
17-
run: dotnet build src/SimpleS3.sln
14+
dotnet-version: '5.0.x'
15+
- name: Build free
16+
run: dotnet build -c Debug src/SimpleS3.sln
17+
- name: Build commercial
18+
run: dotnet build -c CommercialDebug src/SimpleS3.sln

.github/workflows/nuget-release.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Nuget release
2+
3+
on:
4+
push:
5+
tags:
6+
- '[0-9]+\.[0-9]+\.[0-9]+'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Setup .NET Core 5.0
15+
uses: actions/setup-dotnet@v1
16+
with:
17+
dotnet-version: '5.0.x'
18+
- name: Pack free release
19+
run: dotnet pack -c Release src/SimpleS3.sln -o Temp
20+
- name: Pack commercial release
21+
run: dotnet pack -c CommercialRelease src/SimpleS3.sln -o Temp
22+
- name: Upload to nuget
23+
run: dotnet nuget push --skip-duplicate -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json Temp\*

Directory.Build.props

+14-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
<AssemblyName>Genbox.$(MSBuildProjectName)</AssemblyName>
2121
<PackageProjectUrl>https://github.com/Genbox/$(MSBuildProjectName)</PackageProjectUrl>
2222
<PackageLicenseExpression>MIT</PackageLicenseExpression>
23+
<Configurations>Debug;Release;CommercialDebug;CommercialRelease</Configurations>
2324

2425
<!--SourceLink stuff-->
2526
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2627
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2728
<IncludeSymbols>true</IncludeSymbols>
2829
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
29-
<Configurations>Debug;Release;Commercial</Configurations>
3030
</PropertyGroup>
3131

3232
<ItemGroup>
@@ -39,8 +39,20 @@
3939
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="4.0.0" PrivateAssets="all" />
4040
</ItemGroup>
4141

42-
<PropertyGroup Condition="'$(Configuration)' == 'Commercial'">
42+
<PropertyGroup Condition="'$(Configuration)' == 'CommercialDebug'">
4343
<DefineConstants>$(DefineConstants);COMMERCIAL</DefineConstants>
44+
<AssemblyName>Genbox.$(MSBuildProjectName).Commercial</AssemblyName>
45+
<GenerateDocumentationFile>false</GenerateDocumentationFile>
46+
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
47+
<Optimize>false</Optimize>
48+
</PropertyGroup>
49+
50+
<PropertyGroup Condition="'$(Configuration)' == 'CommercialRelease'">
51+
<DefineConstants>$(DefineConstants);COMMERCIAL</DefineConstants>
52+
<AssemblyName>Genbox.$(MSBuildProjectName).Commercial</AssemblyName>
53+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
54+
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
55+
<Optimize>true</Optimize>
4456
</PropertyGroup>
4557

4658
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">

DotnetPack.ps1

-2
This file was deleted.

DotnetPush.ps1

-2
This file was deleted.

src/SimpleS3.Core/Properties/AssemblyInfo.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22

33
[assembly: InternalsVisibleTo("Genbox.SimpleS3.Core.Tests")]
44
[assembly: InternalsVisibleTo("Genbox.SimpleS3.Core.Benchmarks")]
5-
[assembly: InternalsVisibleTo("Genbox.SimpleS3.Extensions.AmazonS3.Tests")]
5+
[assembly: InternalsVisibleTo("Genbox.SimpleS3.Extensions.AmazonS3.Tests")]
6+
[assembly: InternalsVisibleTo("Genbox.SimpleS3.Core.Tests.Commercial")]
7+
[assembly: InternalsVisibleTo("Genbox.SimpleS3.Core.Benchmarks.Commercial")]
8+
[assembly: InternalsVisibleTo("Genbox.SimpleS3.Extensions.AmazonS3.Tests.Commercial")]

0 commit comments

Comments
 (0)