File tree Expand file tree Collapse file tree 4 files changed +33
-9
lines changed
src/Kavod.Vba.Compression.Tests Expand file tree Collapse file tree 4 files changed +33
-9
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ name: build
22
33on :
44 push :
5- branches : [ "main", "build" ]
65 pull_request :
7- branches : [ "main" ]
6+ branches :
7+ - main
88
99permissions :
1010 contents : read
1515 DOTNET_GENERATE_ASPNET_CERTIFICATE : 0
1616 ContinuousIntegrationBuild : true
1717 RestoreLockedMode : true
18- Configuration : Release
19- VersionSuffix : preview${{ github.run_id }}
2018
2119jobs :
2220 build :
21+ strategy :
22+ fail-fast : false
23+ matrix :
24+ os : [ ubuntu-24.04, windows-2022 ]
25+ configuration : [ 'Debug', 'Release' ]
2326
24- runs-on : ubuntu-22.04
27+ runs-on : ${{ matrix.os }}
28+
29+ env :
30+ Configuration : ${{ matrix.configuration }}
31+ VersionSuffix : preview${{ github.run_id }}
2532
2633 steps :
2734 - name : checkout
2835 uses : actions/checkout@v4
36+
2937 - name : setup dotnet
3038 uses : actions/setup-dotnet@v4
3139 with :
@@ -39,12 +47,14 @@ jobs:
3947
4048 - name : test
4149 run : dotnet test --no-build --no-restore
50+ env :
51+ TestNetCoreOnly : ${{ contains(matrix.os, 'ubuntu') }}
4252
4353 - name : pack
44- run : dotnet pack --no-build --no-restore -o dist
54+ run : dotnet pack --no-build --no-restore -c ${{ matrix.configuration }} - o dist
4555
4656 - name : publish artifact
4757 uses : actions/upload-artifact@v4
4858 with :
49- name : VbaCompression_${{ env.VersionSuffix }}
59+ name : VbaCompression_${{ env.VersionSuffix }}_${{ matrix.configuration }}_${{ matrix.os }}
5060 path : ' ${{ github.workspace }}/dist'
Original file line number Diff line number Diff line change 55 tags : [ 'v*.*.*' ]
66
77permissions :
8+ id-token : write
89 contents : write
910
1011env :
2122 release :
2223 runs-on : ubuntu-22.04
2324
25+ environment :
26+ name : production
27+ url : https://www.nuget.org/packages/NetOfficeFw.VbaCompression
28+
2429 steps :
2530 - name : checkout
2631 uses : actions/checkout@v4
@@ -50,12 +55,18 @@ jobs:
5055 ${{ github.workspace }}/dist
5156 ${{ github.workspace }}/src/Kavod.Vba.Compression/README.md
5257
58+ - name : authenticate nuget.org
59+ uses : NuGet/login@v1
60+ id : nuget
61+ with :
62+ user : ${{ secrets.NUGET_PUSH_USER }}
63+
5364 - name : publish
5465 working-directory : ' ${{ github.workspace}}/dist'
5566 run : |
56- dotnet nuget push "*.nupkg" --api-key "$NUGET_PUSH_KEY " --source https://api.nuget.org/v3/index.json
67+ dotnet nuget push "*.nupkg" --api-key "$NUGET_API_KEY " --source https://api.nuget.org/v3/index.json
5768 env :
58- NUGET_PUSH_KEY : ${{ secrets.NUGET_PUSH_KEY }}
69+ NUGET_API_KEY : ${{ steps.nuget.outputs.NUGET_API_KEY }}
5970
6071 - name : release
6172 uses : softprops/action-gh-release@v2
Original file line number Diff line number Diff line change 11# # Ignore Visual Studio temporary files, build results, and
22# # files generated by popular Visual Studio add-ons.
33
4+ dist /
5+
46# User-specific files
57* .suo
68* .user
Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <TargetFrameworks >net48;net8.0</TargetFrameworks >
5+ <TargetFrameworks Condition =" '$(TestNetCoreOnly)' == 'true' " >net8.0</TargetFrameworks >
56 <IsPackable >false</IsPackable >
67 </PropertyGroup >
78
You can’t perform that action at this time.
0 commit comments