@@ -2,9 +2,10 @@ name: ci
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [ main, v* ]
66 pull_request :
7- branches : [ main ]
7+ branches : [ main, v* ]
8+ workflow_dispatch :
89
910jobs :
1011 windows-x64 :
4041 shell : cmd
4142 - uses : actions/upload-artifact@v3
4243 with :
43- name : ${{ matrix.os }}_${{ matrix.configuration }}_x86
44+ name : ${{ matrix.os }}_${{ matrix.configuration }}_${{ matrix.architecture }}
4445 path : |
4546 ./artifacts/bin/**/*
4647 ./artifacts/log/**/*
9697 env :
9798 EXCLUDE_RUN_ID_FROM_PACKAGE : true
9899 EXCLUDE_SUFFIX_FROM_VERSION : false
99- - uses : actions/setup-dotnet@v2
100- if : ${{ github.event_name == 'push' }}
101- with :
102- dotnet-version : ' 6.0.x'
103- - run : dotnet tool install --tool-path ./artifacts/tools SignClient
104- if : ${{ github.event_name == 'push' }}
105- - run : ./artifacts/tools/SignClient "Sign" --baseDirectory "${{ github.workspace }}/artifacts/pkg" --input "**/*.nupkg" --config "${{ github.workspace }}/scripts/SignClientSettings.json" --filelist "${{ github.workspace }}/scripts/SignClientFileList.txt" --user "${{ secrets.SC_USER }}" --secret "${{ secrets.SC_PASS }}" --name "ClangSharp" --description "ClangSharp" --descriptionUrl "https://github.com/dotnet/clangsharp"
106- if : ${{ github.event_name == 'push' }}
107100 - uses : actions/upload-artifact@v3
108101 with :
109102 name : nuget_preview
@@ -113,6 +106,29 @@ jobs:
113106 ./artifacts/pkg/**/*
114107 ./artifacts/tst/**/*
115108 if-no-files-found : error
109+ sign-nuget-preview :
110+ runs-on : windows-latest
111+ if : ${{ github.event_name == 'push' }}
112+ needs : [ build-nuget-preview ]
113+ permissions :
114+ id-token : write
115+ steps :
116+ - uses : actions/checkout@v3
117+ - uses : actions/download-artifact@v3
118+ with :
119+ name : nuget_preview
120+ path : ./artifacts
121+ - uses : actions/setup-dotnet@v3
122+ with :
123+ dotnet-version : ' 6.0.x'
124+ - run : dotnet tool install --tool-path ./artifacts/tools sign --version 0.9.0-beta.23063.3
125+ - run : ./artifacts/tools/sign code azure-key-vault "**/*.nupkg" --timestamp-url "http://timestamp.digicert.com" --base-directory "${{ github.workspace }}/artifacts/pkg" --file-list "${{ github.workspace }}/scripts/SignClientFileList.txt" --publisher-name ".NET Foundation" --description "ClangSharp" --description-url "https://github.com/dotnet/clangsharp" --azure-key-vault-certificate "${{ secrets.SC_KEY_VAULT_CERTIFICATE_ID }}" --azure-key-vault-client-id "${{ secrets.SC_AZURE_CLIENT_ID }}" --azure-key-vault-client-secret "${{ secrets.SC_AZURE_CLIENT_SECRET }}" --azure-key-vault-tenant-id "${{ secrets.SC_AZURE_TENANT_ID }}" --azure-key-vault-url "${{ secrets.SC_KEY_VAULT_URL }}"
126+ - uses : actions/upload-artifact@v3
127+ with :
128+ name : sign_nuget_preview
129+ path : |
130+ ./artifacts/pkg/**/*
131+ if-no-files-found : error
116132 build-nuget-release :
117133 runs-on : windows-latest
118134 steps :
@@ -122,14 +138,6 @@ jobs:
122138 env :
123139 EXCLUDE_RUN_ID_FROM_PACKAGE : true
124140 EXCLUDE_SUFFIX_FROM_VERSION : true
125- - uses : actions/setup-dotnet@v2
126- if : ${{ github.event_name == 'push' }}
127- with :
128- dotnet-version : ' 6.0.x'
129- - run : dotnet tool install --tool-path ./artifacts/tools SignClient
130- if : ${{ github.event_name == 'push' }}
131- - run : ./artifacts/tools/SignClient "Sign" --baseDirectory "${{ github.workspace }}/artifacts/pkg" --input "**/*.nupkg" --config "${{ github.workspace }}/scripts/SignClientSettings.json" --filelist "${{ github.workspace }}/scripts/SignClientFileList.txt" --user "${{ secrets.SC_USER }}" --secret "${{ secrets.SC_PASS }}" --name "ClangSharp" --description "ClangSharp" --descriptionUrl "https://github.com/dotnet/clangsharp"
132- if : ${{ github.event_name == 'push' }}
133141 - uses : actions/upload-artifact@v3
134142 with :
135143 name : nuget_release
@@ -139,12 +147,35 @@ jobs:
139147 ./artifacts/pkg/**/*
140148 ./artifacts/tst/**/*
141149 if-no-files-found : error
150+ sign-nuget-release :
151+ runs-on : windows-latest
152+ if : ${{ github.event_name == 'push' }}
153+ needs : [ build-nuget-release ]
154+ permissions :
155+ id-token : write
156+ steps :
157+ - uses : actions/checkout@v3
158+ - uses : actions/download-artifact@v3
159+ with :
160+ name : nuget_release
161+ path : ./artifacts
162+ - uses : actions/setup-dotnet@v3
163+ with :
164+ dotnet-version : ' 6.0.x'
165+ - run : dotnet tool install --tool-path ./artifacts/tools sign --version 0.9.0-beta.23063.3
166+ - run : ./artifacts/tools/sign code azure-key-vault "**/*.nupkg" --timestamp-url "http://timestamp.digicert.com" --base-directory "${{ github.workspace }}/artifacts/pkg" --file-list "${{ github.workspace }}/scripts/SignClientFileList.txt" --publisher-name ".NET Foundation" --description "ClangSharp" --description-url "https://github.com/dotnet/clangsharp" --azure-key-vault-certificate "${{ secrets.SC_KEY_VAULT_CERTIFICATE_ID }}" --azure-key-vault-client-id "${{ secrets.SC_AZURE_CLIENT_ID }}" --azure-key-vault-client-secret "${{ secrets.SC_AZURE_CLIENT_SECRET }}" --azure-key-vault-tenant-id "${{ secrets.SC_AZURE_TENANT_ID }}" --azure-key-vault-url "${{ secrets.SC_KEY_VAULT_URL }}"
167+ - uses : actions/upload-artifact@v3
168+ with :
169+ name : sign_nuget_release
170+ path : |
171+ ./artifacts/pkg/**/*
172+ if-no-files-found : error
142173 publish-nightlies-azure :
143174 runs-on : ubuntu-latest
144175 if : ${{ github.event_name == 'push' }}
145- needs : [ windows-x64, windows-x86, linux-x64, macos-x64, build -nuget-preview ]
176+ needs : [ windows-x64, windows-x86, linux-x64, macos-x64, sign -nuget-preview, sign-nuget-release ]
146177 steps :
147- - uses : actions/download-artifact@v2
178+ - uses : actions/download-artifact@v3
148179 with :
149180 name : windows_release_x64
150181 path : ./artifacts
@@ -158,9 +189,9 @@ jobs:
158189 publish-nightlies-github :
159190 runs-on : ubuntu-latest
160191 if : false
161- needs : [ windows-x64, windows-x86, linux-x64, macos-x64, build -nuget-preview ]
192+ needs : [ windows-x64, windows-x86, linux-x64, macos-x64, sign -nuget-preview, sign-nuget-release ]
162193 steps :
163- - uses : actions/download-artifact@v2
194+ - uses : actions/download-artifact@v3
164195 with :
165196 name : windows_release_x64
166197 path : ./artifacts
0 commit comments