Skip to content

Commit 65d3dc0

Browse files
Merge branch 'dev' into dev-v10
2 parents 160e758 + 393ff5f commit 65d3dc0

File tree

4 files changed

+110
-21
lines changed

4 files changed

+110
-21
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ env:
1515
NUGET_XMLDOC_MODE: skip
1616
TERM: xterm
1717

18-
permissions:
19-
contents: read
18+
permissions: {}
2019

2120
jobs:
2221
build:
@@ -45,10 +44,14 @@ jobs:
4544

4645
steps:
4746
- name: Checkout code
48-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
47+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
48+
with:
49+
filter: 'tree:0'
50+
persist-credentials: false
51+
show-progress: false
4952

5053
- name: Setup .NET SDK
51-
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
54+
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
5255
id: setup-dotnet
5356

5457
# Arcade only allows the revision to contain up to two characters, and GitHub Actions does not roll-over
@@ -69,16 +72,16 @@ jobs:
6972
Write-Output "_AspNetContribBuildNumber=${BuildId}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
7073
7174
- name: Build, Test and Package
72-
if: ${{ runner.os == 'Windows' }}
75+
if: runner.os == 'Windows'
7376
run: eng\common\CIBuild.cmd -configuration Release -prepareMachine
7477

7578
- name: Build, Test and Package
7679
shell: pwsh
77-
if: ${{ runner.os != 'Windows' }}
80+
if: runner.os != 'Windows'
7881
run: ./eng/common/cibuild.sh -configuration Release -prepareMachine
7982

8083
- name: Attest artifacts
81-
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
84+
uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
8285
if: |
8386
runner.os == 'Windows' &&
8487
github.event.repository.fork == false &&
@@ -93,7 +96,7 @@ jobs:
9396
9497
- name: Publish logs
9598
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
96-
if: ${{ always() }}
99+
if: ${{ !cancelled() }}
97100
with:
98101
name: logs-${{ matrix.os_name }}
99102
path: ./artifacts/log/Release
@@ -106,7 +109,7 @@ jobs:
106109

107110
- name: Publish test results
108111
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
109-
if: ${{ always() }}
112+
if: ${{ !cancelled() }}
110113
with:
111114
name: testresults-${{ matrix.os_name }}
112115
path: ./artifacts/TestResults/Release
@@ -122,7 +125,7 @@ jobs:
122125
name: packages-windows
123126

124127
- name: Setup .NET SDK
125-
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
128+
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
126129
with:
127130
dotnet-version: ${{ needs.build.outputs.dotnet-sdk-version }}
128131

@@ -160,17 +163,23 @@ jobs:
160163
name: packages-windows
161164

162165
- name: Setup .NET SDK
163-
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
166+
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
164167
with:
165168
dotnet-version: ${{ needs.build.outputs.dotnet-sdk-version }}
166169

167170
- name: Push NuGet packages to aspnet-contrib MyGet
168171
env:
169-
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
170-
run: dotnet nuget push "*.nupkg" --api-key "${MYGET_API_KEY}" --skip-duplicate --source https://www.myget.org/F/aspnet-contrib/api/v3/index.json
172+
API_KEY: ${{ secrets.MYGET_API_KEY }}
173+
SOURCE: https://www.myget.org/F/aspnet-contrib/api/v3/index.json
174+
run: dotnet nuget push "*.nupkg" --api-key "${API_KEY}" --skip-duplicate --source "${SOURCE}"
171175

172176
publish-nuget:
173177
needs: [ build, validate-packages ]
178+
environment:
179+
name: NuGet.org
180+
url: https://www.nuget.org/profiles/aspnet-contrib
181+
permissions:
182+
id-token: write
174183
runs-on: ubuntu-latest
175184
if: |
176185
github.event.repository.fork == false &&
@@ -183,11 +192,18 @@ jobs:
183192
name: packages-windows
184193

185194
- name: Setup .NET SDK
186-
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
195+
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
187196
with:
188197
dotnet-version: ${{ needs.build.outputs.dotnet-sdk-version }}
189198

199+
- name: NuGet log in
200+
uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1.1.0
201+
id: nuget-login
202+
with:
203+
user: ${{ secrets.NUGET_USER }}
204+
190205
- name: Push NuGet packages to NuGet.org
191206
env:
192-
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
193-
run: dotnet nuget push "*.nupkg" --api-key "${NUGET_API_KEY}" --skip-duplicate --source https://api.nuget.org/v3/index.json
207+
API_KEY: ${{ steps.nuget-login.outputs.NUGET_API_KEY }}
208+
SOURCE: https://api.nuget.org/v3/index.json
209+
run: dotnet nuget push "*.nupkg" --api-key "${API_KEY}" --skip-duplicate --source "${SOURCE}"

.github/workflows/code-scan.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: code-scan
2+
3+
on:
4+
push:
5+
branches: [ dev* ]
6+
pull_request:
7+
branches: [ dev* ]
8+
schedule:
9+
- cron: '0 12 * * MON'
10+
workflow_dispatch:
11+
12+
permissions: {}
13+
14+
jobs:
15+
16+
code-ql:
17+
runs-on: ubuntu-latest
18+
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
language: [ 'actions', 'csharp' ]
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
32+
with:
33+
filter: 'tree:0'
34+
persist-credentials: false
35+
show-progress: false
36+
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
39+
with:
40+
build-mode: none
41+
languages: ${{ matrix.language }}
42+
43+
- name: Perform CodeQL Analysis
44+
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
45+
with:
46+
category: '/language:${{ matrix.language }}'
47+
48+
zizmor:
49+
runs-on: ubuntu-latest
50+
51+
env:
52+
ZIZMOR_VERSION: '1.13.0'
53+
54+
permissions:
55+
actions: read
56+
contents: read
57+
security-events: write
58+
59+
steps:
60+
- name: Checkout repository
61+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
62+
with:
63+
filter: 'tree:0'
64+
persist-credentials: false
65+
show-progress: false
66+
67+
- name: Scan workflows with zizmor
68+
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 # v0.2.0
69+
with:
70+
version: ${{ env.ZIZMOR_VERSION }}

.github/workflows/update-dotnet-sdk.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,15 @@ on:
1111
type: choice
1212
options:
1313
- 'dev'
14-
- 'dev-v9'
14+
- 'dev-v10'
1515
default: 'dev'
1616

17-
permissions:
18-
contents: read
19-
pull-requests: read
17+
permissions: {}
2018

2119
jobs:
2220
update-sdk:
2321
name: Update .NET SDK
24-
uses: martincostello/update-dotnet-sdk/.github/workflows/update-dotnet-sdk.yml@ee0555fe74ccf33a1d2f0a18e0acc0b190914d33 # v3.8.2
22+
uses: martincostello/update-dotnet-sdk/.github/workflows/update-dotnet-sdk.yml@b4a65696fa41bbe5a4ddf75b7da0e204d7343dc7 # v4.0.0
2523
permissions:
2624
contents: write
2725
pull-requests: write

.github/zizmor.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
rules:
2+
anonymous-definition:
3+
disable: true
4+
undocumented-permissions:
5+
disable: true

0 commit comments

Comments
 (0)