Skip to content

Commit eee55ad

Browse files
maennchenericmj
authored andcommitted
Use Workload Identity Federation for Windows Trusted Signing (elixir-lang#14604)
1 parent cbd5ffc commit eee55ad

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ jobs:
118118

119119
sign:
120120
needs: [build]
121+
environment: release
121122
strategy:
122123
fail-fast: true
123124
matrix:
@@ -129,21 +130,29 @@ jobs:
129130

130131
runs-on: ${{ matrix.flavor == 'linux' && 'ubuntu-22.04' || 'windows-2022' }}
131132

133+
permissions:
134+
contents: write
135+
id-token: write
136+
132137
steps:
133138
- uses: actions/download-artifact@v4
134139
with:
135140
name: build-${{ matrix.flavor }}-elixir-otp-${{ matrix.otp }}
136141

142+
- name: Log in to Azure
143+
if: ${{ matrix.flavor == 'windows' && vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
144+
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
145+
with:
146+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
147+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
148+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
137149
- name: "Sign files with Trusted Signing"
138-
if: github.repository == 'elixir-lang/elixir' && matrix.flavor == 'windows'
139-
uses: azure/[email protected]
150+
uses: azure/trusted-signing-action@0d74250c661747df006298d0fb49944c10f16e03 # v0.5.1
151+
if: ${{ matrix.flavor == 'windows' && vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
140152
with:
141-
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
142-
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
143-
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
144153
endpoint: https://eus.codesigning.azure.net/
145-
trusted-signing-account-name: trusted-signing-elixir
146-
certificate-profile-name: Elixir
154+
trusted-signing-account-name: ${{ vars.AZURE_TRUSTED_SIGNING_ACCOUNT_NAME }}
155+
certificate-profile-name: ${{ vars.AZURE_CERTIFICATE_PROFILE_NAME }}
147156
files-folder: ${{ github.workspace }}
148157
files-folder-filter: exe
149158
file-digest: SHA256

0 commit comments

Comments
 (0)