Skip to content

Commit 406d644

Browse files
committed
chore: bulk package/actions update
(cherry picked from commit 87c54dc)
1 parent 19fd57e commit 406d644

9 files changed

+69
-111
lines changed

.github/workflows/ci-build.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-24.04
3030
steps:
3131
- name: 'Harden Runner'
32-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
32+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
3333
with:
3434
egress-policy: audit
3535

@@ -39,7 +39,7 @@ jobs:
3939
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
4040

4141
- name: 'Setup .NET SDK'
42-
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
42+
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
4343
with:
4444
dotnet-version: 9.0.x
4545

@@ -51,7 +51,7 @@ jobs:
5151
run: dotnet build --configuration Debug --no-restore
5252

5353
- name: Upload Build Artifacts
54-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
54+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5555
with:
5656
name: build-artifacts
5757
path: |
@@ -63,17 +63,17 @@ jobs:
6363

6464
- name: 'Test'
6565
id: test
66-
run: dotnet test --no-build --restore --collect:"XPlat Code Coverage" --logger junit tests/UnitTests/BCrypt.Net.UnitTests.csproj
66+
run: dotnet test --restore --collect:"XPlat Code Coverage" --logger junit --configuration Debug
6767

6868
- name: 'Create test summary'
6969
uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4
7070
with:
71-
paths: tests/**/TestResults.xml
71+
paths: tests/UnitTests/**/TestResults.xml
7272
show: "fail, skip"
7373
if: always()
7474

7575
- name: 'Generate Coverage Reports'
76-
uses: danielpalme/ReportGenerator-GitHub-Action@c38c522d4b391c1b0da979cbb2e902c0a252a7dc # 5.4.3
76+
uses: danielpalme/ReportGenerator-GitHub-Action@cc137d2b561c02b63ae869ffbe8f68af9d904bf4 # 5.4.6
7777
with:
7878
reports: "tests/**/coverage.cobertura.xml"
7979
targetdir: "${{ github.workspace }}"
@@ -98,7 +98,7 @@ jobs:
9898
thresholds: "10 30"
9999

100100
- name: Upload Code Coverage Results
101-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
101+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
102102
with:
103103
name: coverage-results
104104
path: |
@@ -107,13 +107,13 @@ jobs:
107107
retention-days: 5
108108

109109
- name: Publish Test Results
110-
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
110+
uses: EnricoMi/publish-unit-test-result-action@afb2984f4d89672b2f9d9c13ae23d53779671984 # v2.19.0
111111
if: always()
112112
with:
113113
files: "tests/**/TestResults.xml"
114114

115115
- name: Upload Test Artifacts
116-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
116+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
117117
with:
118118
name: test-results
119119
path: "tests/**/TestResults.xml"

.github/workflows/ci-manual-build-test-sign.yml

Lines changed: 39 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- name: Harden Runner
37-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
37+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
3838
with:
3939
egress-policy: audit
4040

@@ -44,7 +44,7 @@ jobs:
4444
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
4545

4646
- name: 'Setup .NET SDK'
47-
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
47+
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
4848
with:
4949
dotnet-version: 9.0.x
5050

@@ -77,92 +77,45 @@ jobs:
7777
Get-ChildItem -Path ${{ env.nupkgDirectory }} -Recurse -Force
7878
7979
- name: Upload unsigned nupkgs
80-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
80+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8181
with:
8282
name: build-artifacts
8383
path: ${{ env.nupkgDirectory }}/*
8484
retention-days: 7
8585

86-
sign:
87-
name: Sign
88-
needs: build
89-
runs-on: windows-latest
90-
if: ${{ inputs.perform_sign }}
91-
environment: release
92-
permissions:
93-
contents: read
94-
id-token: write
95-
steps:
96-
- name: 'Setup .NET SDK'
97-
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
98-
99-
- name: 'Install Sign CLI'
100-
run: dotnet tool install --tool-path ./sign --prerelease sign
101-
102-
- name: 'Gather nupkgs from build output'
103-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
104-
with:
105-
name: build-artifacts
106-
path : ${{ env.nupkgDirectory }}
107-
108-
- name: List assets to be signed
109-
shell: pwsh
110-
run: >
111-
Get-ChildItem -Path ${{ env.nupkgDirectory }} -Include *.nupkg -Recurse -Force
112-
113-
- name: Authenticate to Azure
114-
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # 2.2.0
115-
with:
116-
allow-no-subscriptions : true
117-
client-id: ${{ secrets.AZURE_CLIENT_ID }}
118-
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
119-
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
120-
121-
- name: Sign
122-
shell: pwsh
123-
run: >
124-
./sign/sign code azure-key-vault *.nupkg --base-directory ${{ env.nupkgDirectory }} --azure-key-vault-url "${{ secrets.AZURE_KEY_VAULT_URL }}" --azure-key-vault-certificate "${{ secrets.AZURE_KEY_VAULT_CERTIFICATE }}"
125-
126-
- name: Upload signed nupkgs
127-
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
128-
with:
129-
name: signed-artifacts
130-
path: ${{ env.nupkgDirectory }}/*
131-
retention-days: 7
132-
133-
publish:
134-
name: Publish to nuget
135-
needs: sign
136-
runs-on: ubuntu-latest
137-
if: ${{ inputs.perform_publish }}
138-
environment: release
139-
permissions:
140-
id-token: write
141-
steps:
142-
- name: 'Harden Runner'
143-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
144-
with:
145-
egress-policy: audit
146-
147-
- name: 'Setup .NET SDK'
148-
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
149-
150-
- name: 'Gather nupkgs from signing output'
151-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
152-
with:
153-
name: signed-artifacts
154-
path : ${{ env.nupkgDirectory }}
155-
156-
- name: List assets to be published
157-
shell: pwsh
158-
run: >
159-
Get-ChildItem -Path ${{ env.nupkgDirectory }} -Filter *.nupkg -Recurse -Force
160-
161-
# Use --skip-duplicate to prevent errors if a package with the same version already exists.
162-
# This allows a retry of a failed workflow, already published packages will be skipped without error.
163-
- name: Publish NuGet package
164-
shell: pwsh
165-
run: >
166-
foreach($file in (Get-ChildItem "${{ env.nupkgDirectory }}" -Recurse -Filter *.nupkg)) {
167-
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
168-
}
86+
# publish:
87+
# name: Publish to nuget
88+
# needs: sign
89+
# runs-on: ubuntu-latest
90+
# if: ${{ inputs.perform_publish }}
91+
# environment: release
92+
# permissions:
93+
# id-token: write
94+
# steps:
95+
# - name: 'Harden Runner'
96+
# uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
97+
# with:
98+
# egress-policy: audit
99+
100+
# - name: 'Setup .NET SDK'
101+
# uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
102+
103+
# - name: 'Gather nupkgs from signing output'
104+
# uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
105+
# with:
106+
# name: signed-artifacts
107+
# path : ${{ env.nupkgDirectory }}
108+
109+
# - name: List assets to be published
110+
# shell: pwsh
111+
# run: >
112+
# Get-ChildItem -Path ${{ env.nupkgDirectory }} -Filter *.nupkg -Recurse -Force
113+
114+
# # Use --skip-duplicate to prevent errors if a package with the same version already exists.
115+
# # This allows a retry of a failed workflow, already published packages will be skipped without error.
116+
# - name: Publish NuGet package
117+
# shell: pwsh
118+
# run: >
119+
# foreach($file in (Get-ChildItem "${{ env.nupkgDirectory }}" -Recurse -Filter *.nupkg)) {
120+
# dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
121+
# }

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
steps:
5151
- name: Harden Runner
52-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
52+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
5353
with:
5454
egress-policy: audit
5555

@@ -59,7 +59,7 @@ jobs:
5959
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
6060

6161
- name: 'Setup .NET SDK'
62-
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
62+
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
6363
with:
6464
dotnet-version: 9.0.x
6565

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-24.04
1515
steps:
1616
- name: Harden Runner
17-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
17+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
1818
with:
1919
egress-policy: audit
2020

.github/workflows/devskim.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-24.04
1919
steps:
2020
- name: Harden Runner
21-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
21+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
2222
with:
2323
egress-policy: audit
2424
- uses: actions/checkout@v4

.github/workflows/generate-publish-docs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,18 @@ jobs:
2929
url: ${{ steps.deployment.outputs.page_url }}
3030

3131
steps:
32+
- name: Harden Runner
33+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
34+
with:
35+
egress-policy: audit
36+
3237
- name: 'Checkout'
3338
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3439
with:
3540
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
3641

3742
- name: 'Setup .NET SDK'
38-
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
43+
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
3944
with:
4045
dotnet-version: 9.0.x
4146

.github/workflows/markdown-link-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-24.04
2424
steps:
2525
- name: Harden Runner
26-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
26+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
2727
with:
2828
egress-policy: audit
2929

.github/workflows/upload-coverage-report.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ jobs:
1818
github.event.workflow_run.conclusion == 'success'
1919
steps:
2020
- name: Harden Runner
21-
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
21+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
2222
with:
2323
egress-policy: audit
2424

2525
- name: 'Download coverage results'
26-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
26+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
2727
with:
2828
name: coverage-results
2929

3030
- name: Add Code Coverage PR Comment
31-
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1
31+
uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2
3232
if: github.event_name == 'pull_request'
3333
with:
3434
recreate: true

Directory.Packages.props

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.2.25" />
88
<PackageVersion Include="Nerdbank.GitVersioning" Version="3.7.115" />
99
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
10-
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.6.0.109712" />
10+
<PackageVersion Include="SonarAnalyzer.CSharp" Version="10.9.0.115408" />
1111
<PackageVersion Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" />
1212
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
13-
<PackageVersion Include="xunit.v3" Version="1.1.0" />
14-
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
13+
<PackageVersion Include="xunit.v3" Version="2.0.2" />
14+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.0" />
1515
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
16-
<PackageVersion Include="JunitXml.TestLogger" Version="6.0.0" />
17-
<PackageVersion Include="Microsoft.Sbom.Targets" Version="3.0.1" />
16+
<PackageVersion Include="JunitXml.TestLogger" Version="6.1.0" />
17+
<PackageVersion Include="Microsoft.Sbom.Targets" Version="3.1.0" />
1818
<PackageVersion Include="Microsoft.CodeCoverage" Version="17.13.0" />
1919
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
2020
</ItemGroup>
2121
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net462'">
22-
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
23-
<PackageVersion Include="System.Memory" Version="4.6.0" />
22+
<PackageVersion Include="System.Text.RegularExpressions" Version="[4.3,)" />
23+
<PackageVersion Include="System.Memory" Version="[4.6,)" />
2424
</ItemGroup>
2525
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
2626
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="[9.0,)" />

0 commit comments

Comments
 (0)