Skip to content

Commit 350691d

Browse files
authored
Merge pull request #78 from redth-org/feature/deterministic-build
Make build derterministic and include sources
2 parents ae513c2 + 17fbdcb commit 350691d

File tree

5 files changed

+34
-60
lines changed

5 files changed

+34
-60
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v1
1212

13-
- name: Build Project
14-
run: ./build.ps1
15-
shell: powershell
13+
- name: Setup .NET Core
14+
uses: actions/setup-dotnet@v1
15+
with:
16+
dotnet-version: 3.1.200
17+
18+
- name: Run the Cake script
19+
uses: ecampidoglio/cake-action@master
1620

1721
- uses: actions/upload-artifact@master
1822
with:

.github/workflows/release-nuget.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,18 @@ jobs:
1212
- name: Setup .NET Core
1313
uses: actions/setup-dotnet@v1
1414
with:
15-
dotnet-version: '3.1.100'
16-
17-
- uses: actions/checkout@v1
15+
dotnet-version: 3.1.200
1816

19-
- name: Build Project
20-
run: ./build.ps1
21-
shell: powershell
17+
- name: Run the Cake script
18+
uses: ecampidoglio/cake-action@master
2219

2320
- uses: actions/upload-artifact@master
2421
with:
2522
name: NugetPackage
2623
path: artifacts
2724

2825
- name: Publish NuGet Package (NuGet.org)
29-
run: dotnet nuget push artifacts/**/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
26+
run: dotnet nuget push artifacts/**/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json -n true
3027

3128
- name: Publish NuGet Package (GitHub)
32-
run: dotnet nuget push artifacts/**/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/redth-org/index.json
29+
run: dotnet nuget push artifacts/**/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/redth-org/index.json -n true

Directory.build.props

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Copyright>Copyright (c) nicwise</Copyright>
44
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
55
<PackageProjectUrl>https://github.com/redth-org/BTProgressHUD</PackageProjectUrl>
6-
<PackageIconUrl>https://raw.githubusercontent.com/redth-org/BTProgressHUD/develop/icon.png</PackageIconUrl>
6+
<PackageIcon>icon.png</PackageIcon>
77
<Authors>nicwise</Authors>
88
<Owners>nicwise,ravensorb,redth,cheesebaron</Owners>
99
<PackageTags>Xamarin, MonoTouch, Progress, BTProgressHUD</PackageTags>
@@ -21,26 +21,26 @@
2121
<NoWarn>$(NoWarn);1591;1701;1702;1705;VSX1000;NU1603</NoWarn>
2222
</PropertyGroup>
2323

24+
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
25+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
26+
<Deterministic>true</Deterministic>
27+
</PropertyGroup>
28+
2429
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
25-
<DesignTimeBuild>false</DesignTimeBuild>
2630
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2731
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
28-
<DebugType>portable</DebugType>
29-
<DebugSymbols>true</DebugSymbols>
30-
</PropertyGroup>
31-
32-
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
33-
<DebugType>full</DebugType>
34-
<DebugSymbols>true</DebugSymbols>
35-
</PropertyGroup>
3632

37-
<PropertyGroup Condition=" '$(Configuration)' == 'Release' And '$(OS)' == 'Windows_NT' ">
38-
<!--<IncludeSymbols>true</IncludeSymbols>
39-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>-->
40-
4133
<PublishRepositoryUrl>true</PublishRepositoryUrl>
42-
<EmbedUntrackedSources>true</EmbedUntrackedSources>
34+
<!-- <IncludeSymbols>true</IncludeSymbols> -->
35+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
4336
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
4437
</PropertyGroup>
4538

39+
<ItemGroup>
40+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
41+
</ItemGroup>
42+
43+
<ItemGroup>
44+
<None Include="$(MSBuildThisFileDirectory)icon.png" Pack="true" PackagePath=""/>
45+
</ItemGroup>
4646
</Project>

Directory.build.targets

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,12 @@
11
<Project>
2-
<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
3-
<DefineConstants>$(DefineConstants);NETSTANDARD;PORTABLE</DefineConstants>
4-
</PropertyGroup>
5-
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
6-
<DefineConstants>$(DefineConstants);NET;WPF;XAML</DefineConstants>
7-
</PropertyGroup>
8-
<PropertyGroup Condition="$(TargetFramework.StartsWith('uap'))">
9-
<DefineConstants>$(DefineConstants);NETFX_CORE;XAML;WINDOWS;WINDOWS_UWP</DefineConstants>
10-
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
11-
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
12-
</PropertyGroup>
132
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.ios'))">
143
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;IOS</DefineConstants>
154
</PropertyGroup>
16-
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.mac'))">
17-
<DefineConstants>$(DefineConstants);MONO;COCOA;MAC</DefineConstants>
18-
</PropertyGroup>
19-
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.tvos'))">
20-
<DefineConstants>$(DefineConstants);MONO;COCOA;TVOS</DefineConstants>
21-
</PropertyGroup>
22-
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.watchos'))">
23-
<DefineConstants>$(DefineConstants);MONO;COCOA;WATCHOS</DefineConstants>
24-
</PropertyGroup>
25-
<PropertyGroup Condition="$(TargetFramework.StartsWith('monoandroid'))">
26-
<DefineConstants>$(DefineConstants);MONO;ANDROID</DefineConstants>
27-
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
28-
<AndroidResgenClass>Resource</AndroidResgenClass>
29-
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
30-
</PropertyGroup>
31-
<PropertyGroup Condition="$(TargetFramework.StartsWith('netcoreapp'))">
32-
<DefineConstants>$(DefineConstants);NETCOREAPP</DefineConstants>
33-
</PropertyGroup>
34-
<PropertyGroup Condition="$(TargetFramework.StartsWith('tizen'))">
35-
<DefineConstants>$(DefineConstants);TIZEN</DefineConstants>
36-
<TargetFrameworkIdentifier>Tizen</TargetFrameworkIdentifier>
37-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
5+
6+
<PropertyGroup>
7+
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath>
388
</PropertyGroup>
9+
<ItemGroup>
10+
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/>
11+
</ItemGroup>
3912
</Project>

build.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#tool nuget:?package=GitVersion.CommandLine&version=5.0.1
1+
#tool nuget:?package=GitVersion.CommandLine&version=5.2.4
22
#tool nuget:?package=vswhere&version=2.8.4
33
#addin nuget:?package=Cake.Figlet&version=1.3.1
44

0 commit comments

Comments
 (0)