1+ name : " Build, Sign, Publish"
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths-ignore :
8+ - ' **/*.md'
9+ - ' **/*.gitignore'
10+ - ' **/*.gitattributes'
11+ workflow_dispatch :
12+ branches :
13+ - main
14+ paths-ignore :
15+ - ' **/*.md'
16+ - ' **/*.gitignore'
17+ - ' **/*.gitattributes'
18+
19+ jobs :
20+ build :
21+ name : Build, Pack, Publish
22+ runs-on : ubuntu-latest
23+ env :
24+ DOTNET_CLI_TELEMETRY_OPTOUT : 1
25+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : 1
26+ DOTNET_NOLOGO : true
27+ DOTNET_GENERATE_ASPNET_CERTIFICATE : false
28+ DOTNET_ADD_GLOBAL_TOOLS_TO_PATH : false
29+ DOTNET_MULTILEVEL_LOOKUP : 0
30+ PROJECT : " src/Microsoft.Fast.Components.FluentUI/Microsoft.Fast.Components.FluentUI.csproj"
31+ BUILD_ARCH : " Any CPU"
32+ BUILD_CONFIG : " Release"
33+
34+ steps :
35+ - uses : actions/checkout@v2
36+
37+ - name : Setup .NET 2.1 for ESRP Sign tool
38+ uses : actions/setup-dotnet@v1.8.1
39+ with :
40+ dotnet-version : 2.1.x
41+
42+ - name : Setup .NET 6
43+ uses : actions/setup-dotnet@v1.8.1
44+ with :
45+ dotnet-version : 6.0.x
46+ include-prerelease : true
47+
48+ - name : Restore
49+ run : dotnet restore ${{ env.PROJECT }}
50+
51+ - name : Build
52+ run : dotnet build ${{ env.PROJECT }} --configuration ${{ env.BUILD_CONFIG }} --no-restore
53+
54+ - name : Test
55+ run : dotnet test
56+
57+ - name : Pack
58+ run : dotnet pack ${{ env.PROJECT }} --configuration ${{ env.BUILD_CONFIG }} -o packed --no-build
59+
60+ # Code signing tool goes here
61+ # example of signing using a code-sign cert
62+ # - name: Sign package
63+ # run: dotnet nuget sign **/*.nupkg --certificate-path ${{ steps.cert_file.outputs.filePath }} --certificate-password ${{ secrets.CERT_PWD }} --timestamper http://timestamp.digicert.com
64+
65+ # Uses an API key as the creds
66+ # - name: Publish to NuGet
67+ # run: dotnet nuget push **/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
68+
69+ - name : Publish artifacts
70+ uses : actions/upload-artifact@v2
71+ with :
72+ name : signednupkg
73+ path : packed
0 commit comments