Skip to content

Commit 7c5b9e4

Browse files
committed
Use managed identity for signing
1 parent dd42199 commit 7c5b9e4

File tree

6 files changed

+85
-17
lines changed

6 files changed

+85
-17
lines changed

.config/dotnet-tools.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
"isRoot": true,
44
"tools": {
55
"sign": {
6-
"version": "0.9.1-beta.23203.3",
6+
"version": "0.9.1-beta.25330.2",
77
"commands": [
88
"sign"
9-
]
9+
],
10+
"rollForward": false
1011
}
1112
}
12-
}
13+
}

.github/workflows/push-main.yaml renamed to .github/workflows/ci-signed.yaml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
name: "CI Build (main)"
1+
name: "CI Build (signed)"
22
on:
33
push:
44
branches:
55
- main
6+
- 'rel/**'
67
workflow_dispatch:
78

89
jobs:
9-
build:
10+
deployment:
1011
name: "Build"
1112
runs-on: windows-latest
13+
environment: signing
14+
permissions:
15+
id-token: write # Required for Azure CLI Login
1216
env:
1317
DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE: true
1418
DOTNET_NOLOGO: true
@@ -32,17 +36,21 @@ jobs:
3236
- name: Get .NET information
3337
run: dotnet --info
3438

39+
- name: Login to Azure CLI
40+
uses: azure/login@v2
41+
with:
42+
client-id: ${{ vars.KEYVAULT_APP_ID }}
43+
tenant-id: ${{ vars.KEYVAULT_TENANT_ID }}
44+
subscription-id: ${{ vars.KEYVAULT_SUBSCRIPTION_ID }}
45+
3546
- name: "Build target: BuildAll & PublishPackages"
3647
env:
37-
PUSH_APIKEY: ${{ secrets.PUSH_APIKEY }}
38-
PUSH_URI: ${{ secrets.PUSH_URI }}
39-
SIGN_APP_ID: ${{ secrets.SIGN_APP_ID }}
40-
SIGN_APP_SECRET: ${{ secrets.SIGN_APP_SECRET }}
41-
SIGN_CERT_NAME: ${{ secrets.SIGN_CERT_NAME }}
42-
SIGN_SUBSCRIPTION: ${{ secrets.SIGN_SUBSCRIPTION }}
43-
SIGN_TENANT: ${{ secrets.SIGN_TENANT }}
44-
SIGN_TIMESTAMP_URI: ${{ secrets.SIGN_TIMESTAMP_URI }}
45-
SIGN_VAULT_URI: ${{ secrets.SIGN_VAULT_URI }}
48+
PUSH_APIKEY: ${{ secrets.FEEDZ_PUSH_KEY }}
49+
PUSH_URI: ${{ vars.FEEDZ_PUSH_URL }}
50+
SIGN_APP_ID: ${{ vars.KEYVAULT_APP_ID }}
51+
SIGN_CERT_NAME: ${{ vars.KEYVAULT_CERT_NAME }}
52+
SIGN_TIMESTAMP_URI: ${{ vars.KEYVAULT_TIMESTAMP_URL }}
53+
SIGN_VAULT_URI: ${{ vars.KEYVAULT_URL }}
4654
run: dotnet run --project tools/builder --no-launch-profile -- BuildAll PublishPackages --timing
4755

4856
- name: "Upload artifact: test"
@@ -65,6 +73,5 @@ jobs:
6573
uses: ctrf-io/github-test-reporter@v1
6674
with:
6775
report-path: './artifacts/test/*.ctrf'
68-
summary-report: true
6976
github-report: true
7077
if: always()

.github/workflows/ci-unsigned.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: "CI Build (unsigned)"
2+
on:
3+
push:
4+
branches-ignore:
5+
- main
6+
- 'rel/**'
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
name: "Build"
12+
runs-on: windows-latest
13+
env:
14+
DOTNET_CLI_WORKLOAD_UPDATE_NOTIFY_DISABLE: true
15+
DOTNET_NOLOGO: true
16+
steps:
17+
- name: Clone source
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
submodules: true
22+
23+
- name: Add MSBuild to PATH
24+
uses: microsoft/setup-msbuild@v2
25+
26+
- name: Install .NET SDK
27+
uses: actions/setup-dotnet@v4
28+
with:
29+
dotnet-version: |
30+
8.0.x
31+
9.0.x
32+
33+
- name: Get .NET information
34+
run: dotnet --info
35+
36+
- name: "Build target: BuildAll"
37+
run: dotnet run --project tools/builder --no-launch-profile -- BuildAll --timing
38+
39+
- name: "Upload artifact: test"
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: test
43+
path: artifacts/test
44+
compression-level: 9
45+
if: always()
46+
47+
- name: "Upload artifact: packages"
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: packages
51+
path: artifacts/packages
52+
compression-level: 0
53+
if: always()
54+
55+
- name: Publish Test Report
56+
uses: ctrf-io/github-test-reporter@v1
57+
with:
58+
report-path: './artifacts/test/*.ctrf'
59+
github-report: true
60+
if: always()

.github/workflows/pull-request.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
uses: ctrf-io/github-test-reporter@v1
4646
with:
4747
report-path: './artifacts/test/*.ctrf'
48-
summary-report: true
4948
github-report: true
5049
pull-request: true
5150
update-comment: true

src/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
<PrereleaseSuffix Condition=" '$(GITHUB_ACTIONS)' != 'true' ">-dev</PrereleaseSuffix>
102102
<!-- Never put the Git hash in the package version -->
103103
<PackageVersion>$(BuildVersionSimple)$(PrereleaseVersion)$(PrereleaseSuffix)</PackageVersion>
104+
<PackageReleaseNotes>https://xunit.net/releases/visualstudio/$(PackageVersion)</PackageReleaseNotes>
104105
<!-- Pass through values we don't know ahead of time for any hand-crafted .nuspec files -->
105106
<NuspecProperties>
106107
Configuration=$(Configuration);

tools/builder/common

0 commit comments

Comments
 (0)