Skip to content

Commit 9646eca

Browse files
committed
feat: windows signing with Azure trusted signing
1 parent 54de478 commit 9646eca

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: windows-code-sign
2+
description: Sign Windows binaries with Azure Trusted Signing.
3+
inputs:
4+
target:
5+
description: Target triple for the artifacts to sign.
6+
required: true
7+
client-id:
8+
description: Azure Trusted Signing client ID.
9+
required: true
10+
tenant-id:
11+
description: Azure tenant ID for Trusted Signing.
12+
required: true
13+
subscription-id:
14+
description: Azure subscription ID for Trusted Signing.
15+
required: true
16+
endpoint:
17+
description: Azure Trusted Signing endpoint.
18+
required: true
19+
account-name:
20+
description: Azure Trusted Signing account name.
21+
required: true
22+
certificate-profile-name:
23+
description: Certificate profile name for signing.
24+
required: true
25+
26+
runs:
27+
using: composite
28+
steps:
29+
- name: Azure login for Trusted Signing (OIDC)
30+
uses: azure/login@v2
31+
with:
32+
client-id: ${{ inputs.client-id }}
33+
tenant-id: ${{ inputs.tenant-id }}
34+
subscription-id: ${{ inputs.subscription-id }}
35+
36+
- name: Sign Windows binaries with Azure Trusted Signing
37+
uses: azure/trusted-signing-action@v0
38+
with:
39+
endpoint: ${{ inputs.endpoint }}
40+
trusted-signing-account-name: ${{ inputs.account-name }}
41+
certificate-profile-name: ${{ inputs.certificate-profile-name }}
42+
exclude-environment-credential: true
43+
exclude-workload-identity-credential: true
44+
exclude-managed-identity-credential: true
45+
exclude-shared-token-cache-credential: true
46+
exclude-visual-studio-credential: true
47+
exclude-visual-studio-code-credential: true
48+
exclude-azure-cli-credential: false
49+
exclude-azure-powershell-credential: true
50+
exclude-azure-developer-cli-credential: true
51+
exclude-interactive-browser-credential: true
52+
files: |
53+
${{ github.workspace }}/codex-rs/target/${{ inputs.target }}/release/codex.exe
54+
${{ github.workspace }}/codex-rs/target/${{ inputs.target }}/release/codex-responses-api-proxy.exe

.github/workflows/rust-release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ jobs:
110110
target: ${{ matrix.target }}
111111
artifacts-dir: ${{ github.workspace }}/codex-rs/target/${{ matrix.target }}/release
112112

113+
- if: ${{ contains(matrix.target, 'windows') }}
114+
name: Sign Windows binaries with Azure Trusted Signing
115+
uses: ./.github/actions/windows-code-sign
116+
with:
117+
target: ${{ matrix.target }}
118+
client-id: ${{ secrets.AZURE_TRUSTED_SIGNING_CLIENT_ID }}
119+
tenant-id: ${{ secrets.AZURE_TRUSTED_SIGNING_TENANT_ID }}
120+
subscription-id: ${{ secrets.AZURE_TRUSTED_SIGNING_SUBSCRIPTION_ID }}
121+
endpoint: ${{ secrets.AZURE_TRUSTED_SIGNING_ENDPOINT }}
122+
account-name: ${{ secrets.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
123+
certificate-profile-name: ${{ secrets.AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME }}
124+
113125
- if: ${{ matrix.runner == 'macos-15-xlarge' }}
114126
name: Configure Apple code signing
115127
shell: bash

0 commit comments

Comments
 (0)