Skip to content

Commit 1a01cfb

Browse files
committed
Pin version of the action and no longer persist credentials.
1 parent 3ea5876 commit 1a01cfb

File tree

1 file changed

+48
-35
lines changed

1 file changed

+48
-35
lines changed

.github/workflows/main.yml

Lines changed: 48 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v5
24+
with:
25+
persist-credentials: false
2426

2527
- name: Install dependencies
2628
run: build/linux-x64/install.dependencies.sh
@@ -53,6 +55,8 @@ jobs:
5355
steps:
5456
- name: Checkout
5557
uses: actions/checkout@v5
58+
with:
59+
persist-credentials: false
5660

5761
- name: Install dependencies
5862
run: build/linux-musl-x64/install.dependencies.sh
@@ -83,6 +87,8 @@ jobs:
8387
steps:
8488
- name: Checkout
8589
uses: actions/checkout@v5
90+
with:
91+
persist-credentials: false
8692

8793
- name: Install dependencies
8894
run: build/linux-arm64/install.dependencies.sh
@@ -115,6 +121,8 @@ jobs:
115121
steps:
116122
- name: Checkout
117123
uses: actions/checkout@v5
124+
with:
125+
persist-credentials: false
118126

119127
- name: Install dependencies
120128
run: build/macos-x64/install.dependencies.sh
@@ -133,12 +141,14 @@ jobs:
133141
run: build/shared/test.Magick.NET.sh x64
134142

135143
macos_arm64:
136-
name: 'MacOS (Q8/Q16/Q16-HDRI, arm64)'
144+
name: MacOS (Q8/Q16/Q16-HDRI, arm64)
137145
runs-on: macos-14
138146

139147
steps:
140148
- name: Checkout
141149
uses: actions/checkout@v5
150+
with:
151+
persist-credentials: false
142152

143153
- name: Install dependencies
144154
run: build/macos-arm64/install.dependencies.sh
@@ -184,6 +194,7 @@ jobs:
184194
uses: actions/checkout@v5
185195
with:
186196
fetch-tags: true
197+
persist-credentials: false
187198

188199
- name: Install dependencies
189200
run: ./install.dependencies.cmd
@@ -235,48 +246,49 @@ jobs:
235246
platformName: [arm64]
236247

237248
steps:
238-
- name: Checkout
239-
uses: actions/checkout@v5
240-
with:
241-
fetch-tags: true
249+
- name: Checkout
250+
uses: actions/checkout@v5
251+
with:
252+
fetch-tags: true
253+
persist-credentials: false
242254

243-
- name: Install dependencies
244-
run: ./install.dependencies.cmd
245-
working-directory: build/windows
255+
- name: Install dependencies
256+
run: ./install.dependencies.cmd
257+
working-directory: build/windows
246258

247-
- name: Create nuget.config
248-
run: ./create-nuget-config.cmd "dlemstra" "${{ secrets.GITHUB_TOKEN }}"
249-
working-directory: src/Magick.Native
259+
- name: Create nuget.config
260+
run: ./create-nuget-config.cmd "dlemstra" "${{ secrets.GITHUB_TOKEN }}"
261+
working-directory: src/Magick.Native
250262

251-
- name: Install Magick.Native
252-
run: ./install.cmd
253-
working-directory: src/Magick.Native
263+
- name: Install Magick.Native
264+
run: ./install.cmd
265+
working-directory: src/Magick.Native
254266

255-
# - name: Build Magick.NET (Test)
256-
# run: ./build.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" Test
257-
# working-directory: build/windows
267+
# - name: Build Magick.NET (Test)
268+
# run: ./build.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" Test
269+
# working-directory: build/windows
258270

259-
# - name: Test Magick.NET
260-
# run: ./test.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}"
261-
# working-directory: build/windows
271+
# - name: Test Magick.NET
272+
# run: ./test.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}"
273+
# working-directory: build/windows
262274

263-
- name: Build Magick.NET (Release)
264-
run: ./build.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" Release
265-
working-directory: build/windows
275+
- name: Build Magick.NET (Release)
276+
run: ./build.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" Release
277+
working-directory: build/windows
266278

267-
- name: Set NuGet version
268-
run: ./set.version.ps1
269-
working-directory: publish
279+
- name: Set NuGet version
280+
run: ./set.version.ps1
281+
working-directory: publish
270282

271-
- name: Create NuGet package
272-
run: ./publish.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}"
273-
working-directory: publish
283+
- name: Create NuGet package
284+
run: ./publish.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}"
285+
working-directory: publish
274286

275-
- name: Upload library
276-
uses: actions/upload-artifact@v5
277-
with:
278-
name: Magick.NET-${{ matrix.quantumName }}-${{ matrix.platformName }}
279-
path: publish/output
287+
- name: Upload library
288+
uses: actions/upload-artifact@v5
289+
with:
290+
name: Magick.NET-${{ matrix.quantumName }}-${{ matrix.platformName }}
291+
path: publish/output
280292

281293
libraries:
282294
name: Library
@@ -292,6 +304,7 @@ jobs:
292304
uses: actions/checkout@v5
293305
with:
294306
fetch-tags: true
307+
persist-credentials: false
295308

296309
- name: Install dependencies
297310
run: ./install.dependencies.cmd
@@ -348,7 +361,7 @@ jobs:
348361
run: dotnet tool install --global sign --prerelease
349362

350363
- name: Azure CLI login with federated credential
351-
uses: azure/login@v2
364+
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
352365
with:
353366
client-id: ${{ secrets.AZURE_CLIENT_ID }}
354367
tenant-id: ${{ secrets.AZURE_TENANT_ID }}

0 commit comments

Comments
 (0)