File tree 3 files changed +51
-8
lines changed
3 files changed +51
-8
lines changed Original file line number Diff line number Diff line change 44
44
45
45
- name : Run Tests
46
46
run : dotnet test test\OpenFeature.Tests\ --configuration Release --logger GitHubActions
47
+
48
+ packaging :
49
+ needs :
50
+ - unit-tests-linux
51
+ - unit-tests-windows
52
+
53
+ permissions :
54
+ contents : read
55
+ packages : write
56
+
57
+ runs-on : ubuntu-latest
58
+
59
+ steps :
60
+ - uses : actions/checkout@v4
61
+
62
+ - name : Setup .NET SDK
63
+ uses : actions/setup-dotnet@v4
64
+ with :
65
+ dotnet-version : |
66
+ 6.0.x
67
+ 7.0.x
68
+
69
+ - name : Restore
70
+ run : dotnet restore
71
+
72
+ - name : Pack NuGet packages (CI versions)
73
+ if : startsWith(github.ref, 'refs/heads/')
74
+ run : dotnet pack --no-restore --version-suffix "ci.$(date -u +%Y%m%dT%H%M%S)+sha.${GITHUB_SHA:0:9}"
75
+
76
+ - name : Pack NuGet packages (PR versions)
77
+ if : startsWith(github.ref, 'refs/pull/')
78
+ run : dotnet pack --no-restore --version-suffix "pr.$(date -u +%Y%m%dT%H%M%S)+sha.${GITHUB_SHA:0:9}"
79
+
80
+ - name : Publish NuGet packages (base)
81
+ if : github.event.pull_request.head.repo.fork == false
82
+ run : dotnet nuget push "src/**/*.nupkg" --api-key "${{ secrets.GITHUB_TOKEN }}" --source https://nuget.pkg.github.com/open-feature/index.json
83
+
84
+ - name : Publish NuGet packages (fork)
85
+ if : github.event.pull_request.head.repo.fork == true
86
+
87
+ with :
88
+ name : nupkgs
89
+ path : src/**/*.nupkg
Original file line number Diff line number Diff line change 2
2
<Import Project =" .\Common.props" />
3
3
4
4
<PropertyGroup >
5
+ <ContinuousIntegrationBuild Condition =" '$(CI)' == 'true'" >true</ContinuousIntegrationBuild >
6
+ <Deterministic Condition =" '$(CI)' == 'true'" >true</Deterministic >
5
7
<GenerateDocumentationFile >true</GenerateDocumentationFile >
8
+ <PackRelease >true</PackRelease >
6
9
</PropertyGroup >
7
10
8
11
<PropertyGroup >
16
19
<PackageLicenseExpression >Apache-2.0</PackageLicenseExpression >
17
20
<Authors >OpenFeature Authors</Authors >
18
21
<PackageRequireLicenseAcceptance >true</PackageRequireLicenseAcceptance >
19
- <Version >$(VersionNumber)</Version >
22
+ <VersionPrefix >$(VersionNumber)</VersionPrefix >
20
23
<AssemblyVersion >$(VersionNumber)</AssemblyVersion >
21
24
<FileVersion >$(VersionNumber)</FileVersion >
22
25
</PropertyGroup >
32
35
<SymbolPackageFormat >snupkg</SymbolPackageFormat >
33
36
</PropertyGroup >
34
37
35
- <ItemGroup Condition =" '$(Deterministic)'=='true'" >
36
- <SourceRoot Include =" $(MSBuildThisFileDirectory)/" />
37
- </ItemGroup >
38
-
39
- <PropertyGroup Condition =" '$(Deterministic)'=='true'" >
40
- <ContinuousIntegrationBuild >true</ContinuousIntegrationBuild >
41
- </PropertyGroup >
42
38
</Project >
Original file line number Diff line number Diff line change 28
28
<PackageReference Include =" System.Collections.Immutable" Version =" [1.7.1,)" />
29
29
<PackageReference Include =" System.Threading.Channels" Version =" [6.0.0,)" />
30
30
</ItemGroup >
31
+
32
+ <ItemGroup Condition =" '$(OS)' == 'Unix'" >
33
+ <PackageReference Include =" Microsoft.NETFramework.ReferenceAssemblies" Version =" 1.0.3" PrivateAssets =" all" />
34
+ </ItemGroup >
31
35
</Project >
You can’t perform that action at this time.
0 commit comments