@@ -12,112 +12,16 @@ env:
1212 productNamespacePrefix : " Punchclock"
1313
1414jobs :
15- build :
16- runs-on : windows-2022
17- outputs :
18- nbgv : ${{ steps.nbgv.outputs.SemVer2 }}
19- steps :
20- - name : Checkout
21- uses : actions/checkout@v3
22- with :
23- fetch-depth : 0
24-
25- - name : Install .NET 6
26- uses : actions/setup-dotnet@v3
27- with :
28- dotnet-version : 6.0.x
29- dotnet-quality : ' preview'
30-
31- - name : NBGV
32- id : nbgv
33- uses : dotnet/nbgv@master
34- with :
35- setAllVars : true
36-
37- - name : NuGet Restore
38- run : dotnet restore
39- working-directory : src
40-
41- - name : Add MSBuild to PATH
42- uses : microsoft/setup-msbuild@v1
43-
44- - name : Build
45- run : msbuild /t:build,pack /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=${{ env.configuration }}
46- working-directory : src
47-
48- - name : Run Unit Tests and Generate Coverage
49- uses : glennawatson/coverlet-msbuild@v1
50- with :
51- project-files : ' **/*Tests*.csproj'
52- no-build : true
53- exclude-filter : ' [${{env.productNamespacePrefix}}.*.Tests.*]*'
54- include-filter : ' [${{env.productNamespacePrefix}}*]*'
55- output-format : cobertura
56- output : ' ../../artifacts/'
57- configuration : ${{ env.configuration }}
58-
59- - name : Upload Code Coverage
60- shell : bash
61- run : |
62- echo $PWD
63- bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -t ${{ env.CODECOV_TOKEN }} -s '$PWD/artifacts' -f '*.xml'
64- env :
65- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
66-
67- - name : Create NuGet Artifacts
68- uses : actions/upload-artifact@master
69- with :
70- name : nuget
71- path : ' **/*.nupkg'
72-
7315 release :
74- runs-on : ubuntu-latest
75- needs : build
76- if : contains(github.event.pull_request.labels.*.name, 'release') && github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
77- steps :
78- - name : Checkout
79- uses : actions/checkout@v3
80- with :
81- fetch-depth : 0
82-
83- - name : Download NuGet Packages
84- uses : actions/download-artifact@v2
85- with :
86- name : nuget
87-
88- - name : Save SignClient Configuration
89- run : ' echo "$SIGN_CLIENT_CONFIG" > SignPackages.json'
90- shell : bash
91- env :
92- SIGN_CLIENT_CONFIG : ${{secrets.SIGN_CLIENT_CONFIG}}
93-
94- - name : Sign NuGet Packages
95- uses : glennawatson/signclient@v1
96- with :
97- input-files : ' **/*.nupkg'
98- sign-client-secret : ${{ secrets.SIGN_CLIENT_SECRET }}
99- sign-client-user : ${{ secrets.SIGN_CLIENT_USER_ID }}
100- project-name : reactiveui
101- description : reactiveui
102- config-file : SignPackages.json
103-
104- - name : Changelog
105- uses : glennawatson/ChangeLog@v1
106- id : changelog
107-
108- - name : Create Release
109- uses : actions/create-release@v1
110- env :
111- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
112- with :
113- tag_name : ${{ needs.build.outputs.nbgv }}
114- release_name : ${{ needs.build.outputs.nbgv }}
115- body : |
116- ${{ steps.changelog.outputs.commitLog }}
117-
118- - name : NuGet Push
119- env :
120- NUGET_AUTH_TOKEN : ${{ secrets.NUGET_API_KEY }}
121- SOURCE_URL : https://api.nuget.org/v3/index.json
122- run : |
123- dotnet nuget push -s ${{ env.SOURCE_URL }} -k ${{ env.NUGET_AUTH_TOKEN }} **/*.nupkg
16+ uses : reactiveui/actions-common/.github/workflows/workflow-common-release.yml@main
17+ with :
18+ configuration : Release
19+ productNamespacePrefix : " Punchclock"
20+ useVisualStudioPreview : false
21+ useMauiCheckDotNetTool : false
22+ solutionFile : " Punchclock.sln"
23+ secrets :
24+ SIGN_CLIENT_USER_ID : ${{ secrets.SIGN_CLIENT_USER_ID }}
25+ SIGN_CLIENT_SECRET : ${{ secrets.SIGN_CLIENT_SECRET }}
26+ SIGN_CLIENT_CONFIG : ${{ secrets.SIGN_CLIENT_CONFIG }}
27+ NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
0 commit comments