Skip to content

Commit 5fdb9de

Browse files
authored
Merge pull request #259 from Yubico/release/1.13.2
Release 1.13.2
2 parents 3d805dc + fa06e67 commit 5fdb9de

File tree

241 files changed

+6273
-20767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+6273
-20767
lines changed

.github/ISSUE_TEMPLATE/2-bug-report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: 🐞 Bug
22
description: File a bug/issue.
33
title: "[BUG] <title>"
44
labels: ["bug"]
5+
type: Bug
56
projects: []
67
assignees: []
78
body:

.github/ISSUE_TEMPLATE/3-feature-request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: 💡 Feature Request
22
description: Suggest an idea for this project.
33
title: "[Feature]: <title>"
44
labels: ["enhancement"]
5+
type: Feature
56
projects: []
67
body:
78
- type: markdown

.github/dependabot.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "nuget"
9+
directory: "/"
10+
target-branch: "dependencies"
11+
schedule:
12+
interval: "weekly"
13+
day: "wednesday"
14+
time: "09:00"
15+
timezone: "Europe/Stockholm"
16+
groups:
17+
all_packages:
18+
update-types:
19+
- "minor"
20+
- "patch"
21+
patterns:
22+
- "*"
23+
open-pull-requests-limit: 10
24+
- package-ecosystem: "dotnet-sdk"
25+
directory: "/"
26+
schedule:
27+
interval: "weekly"
28+
day: "wednesday"
29+
time: "09:00"
30+
timezone: "Europe/Stockholm"
31+
ignore:
32+
- dependency-name: "*"
33+
update-types:
34+
- "version-update:semver-major"

.github/workflows/build-nativeshims.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232
jobs:
3333
build-windows:
3434
name: Build Windows
35-
runs-on: windows-2019
35+
runs-on: windows-2022
3636
steps:
3737
- uses: actions/checkout@v4
3838
- run: |
@@ -115,7 +115,7 @@ jobs:
115115
contents: read
116116
packages: read
117117
attestations: write
118-
runs-on: windows-2019
118+
runs-on: windows-2022
119119
needs: [build-windows, build-linux-amd64, build-linux-arm64, build-macos]
120120
env:
121121
PACKAGE_VERSION: ${{ github.event.inputs.version != '' && github.event.inputs.version || '1.0.0' }}
@@ -131,7 +131,7 @@ jobs:
131131
$repo.SetAttribute("url","$env:GITHUB_REPO_URL")
132132
$repo.SetAttribute("type","git")
133133
$nuspec.package.metadata.AppendChild($repo)
134-
$repo.SetAttribute("url","$env:GITHUB_REPO_URL")
134+
$nuspec.package.metadata.version = "$env:PACKAGE_VERSION"
135135
$nuspec.Save("Yubico.NativeShims.nuspec")
136136
cat Yubico.NativeShims.nuspec
137137
- run: nuget pack Yubico.NativeShims.nuspec
@@ -153,7 +153,7 @@ jobs:
153153
154154
publish-internal:
155155
name: Publish to internal NuGet
156-
runs-on: windows-2019
156+
runs-on: windows-2022
157157
needs: pack
158158
environment: Internal NuGet feed
159159
permissions:
@@ -162,7 +162,7 @@ jobs:
162162
steps:
163163
- uses: actions/download-artifact@v4
164164
with:
165-
name: Yubico.NativeShims.nupkg
165+
name: NuGet Package NativeShims
166166
- run: |
167167
dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Yubico/index.json"
168168
dotnet nuget push Yubico.NativeShims.*.nupkg --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build.yml

Lines changed: 74 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ on:
4747
type: string
4848
schedule:
4949
- cron: '0 0 * * *' # Every day at midnight
50-
50+
5151
jobs:
5252
run-tests:
5353
name: Run tests
@@ -62,15 +62,20 @@ jobs:
6262

6363
build-artifacts:
6464
name: Build artifacts
65-
runs-on: windows-2019
65+
runs-on: windows-2022
6666
needs: run-tests
6767
permissions:
6868
id-token: write
6969
contents: read
7070
packages: read
7171
attestations: write
72+
outputs:
73+
docs-log-id: ${{ steps.docs-log-upload.outputs.artifact-id }}
74+
docs-id: ${{ steps.docs-upload.outputs.artifact-id }}
75+
nuget-packages-id: ${{ steps.nuget-upload.outputs.artifact-id }}
76+
symbols-packages-id: ${{ steps.symbols-upload.outputs.artifact-id }}
77+
assemblies-id: ${{ steps.assemblies-upload.outputs.artifact-id }}
7278
steps:
73-
# Checkout the local repository
7479
- uses: actions/checkout@v4
7580
- uses: actions/setup-dotnet@v4
7681
with:
@@ -99,6 +104,7 @@ jobs:
99104
100105
# Upload documentation log
101106
- name: "Save build artifacts: Docs log"
107+
id: docs-log-upload
102108
uses: actions/upload-artifact@v4
103109
with:
104110
name: Documentation log
@@ -107,6 +113,7 @@ jobs:
107113

108114
# Upload documentation
109115
- name: "Save build artifacts: Docs"
116+
id: docs-upload
110117
uses: actions/upload-artifact@v4
111118
with:
112119
name: Documentation
@@ -115,6 +122,7 @@ jobs:
115122

116123
# Upload NuGet packages
117124
- name: "Save build artifacts: Nuget Packages"
125+
id: nuget-upload
118126
uses: actions/upload-artifact@v4
119127
with:
120128
name: Nuget Packages
@@ -125,6 +133,7 @@ jobs:
125133

126134
# Upload symbols
127135
- name: "Save build artifacts: Symbols Packages"
136+
id: symbols-upload
128137
uses: actions/upload-artifact@v4
129138
with:
130139
name: Symbols Packages
@@ -135,6 +144,7 @@ jobs:
135144

136145
# Upload assemblies
137146
- name: "Save build artifacts: Assemblies"
147+
id: assemblies-upload
138148
uses: actions/upload-artifact@v4
139149
with:
140150
name: Assemblies
@@ -166,15 +176,14 @@ jobs:
166176

167177
publish-internal:
168178
name: Publish to internal NuGet
169-
runs-on: windows-2019
179+
runs-on: windows-2022
170180
needs: build-artifacts
171181
if: ${{ github.event.inputs.push-to-dev == 'true' }}
172182
permissions:
173183
contents: read
174184
packages: write
175185
steps:
176186
- uses: actions/download-artifact@v4
177-
id: download
178187
with:
179188
name: Nuget Packages
180189
- run: |
@@ -183,3 +192,63 @@ jobs:
183192
dotnet nuget add source --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Yubico/index.json"
184193
dotnet nuget push $core --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}
185194
dotnet nuget push $yubikey --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}
195+
196+
build-summary:
197+
name: Build summary
198+
runs-on: ubuntu-latest
199+
needs: [run-tests, build-artifacts, publish-internal, upload-docs]
200+
if: always()
201+
steps:
202+
- name: Generate build summary
203+
env:
204+
# Pass job results into the environment
205+
RUN_TESTS_RESULT: ${{ needs.run-tests.result }}
206+
BUILD_ARTIFACTS_RESULT: ${{ needs.build-artifacts.result }}
207+
UPLOAD_DOCS_RESULT: ${{ needs.upload-docs.result }}
208+
PUBLISH_INTERNAL_RESULT: ${{ needs.publish-internal.result }}
209+
DOCS_IMAGE_TAG: ${{ needs.upload-docs.outputs.image-tag }}
210+
DOCS_IMAGE_HASH: ${{ needs.upload-docs.outputs.image-hash }}
211+
212+
# Pass artifact IDs from the build-artifacts job outputs
213+
DOCS_LOG_ID: ${{ needs.build-artifacts.outputs.docs-log-id }}
214+
DOCS_ID: ${{ needs.build-artifacts.outputs.docs-id }}
215+
NUGET_ID: ${{ needs.build-artifacts.outputs.nuget-packages-id }}
216+
SYMBOLS_ID: ${{ needs.build-artifacts.outputs.symbols-packages-id }}
217+
ASSEMBLIES_ID: ${{ needs.build-artifacts.outputs.assemblies-id }}
218+
run: |
219+
ARTIFACT_URL_BASE="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts"
220+
221+
echo "## Build Summary" >> $GITHUB_STEP_SUMMARY
222+
echo "" >> $GITHUB_STEP_SUMMARY
223+
echo "### Job Status" >> $GITHUB_STEP_SUMMARY
224+
echo "| Job | Status |" >> $GITHUB_STEP_SUMMARY
225+
echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY
226+
echo "| Run tests | **${{ env.RUN_TESTS_RESULT }}** |" >> $GITHUB_STEP_SUMMARY
227+
echo "| Build artifacts | **${{ env.BUILD_ARTIFACTS_RESULT }}** |" >> $GITHUB_STEP_SUMMARY
228+
echo "| Upload docs | **${{ env.UPLOAD_DOCS_RESULT }}** |" >> $GITHUB_STEP_SUMMARY
229+
echo "| Publish to internal NuGet | **${{ env.PUBLISH_INTERNAL_RESULT }}** |" >> $GITHUB_STEP_SUMMARY
230+
echo "" >> $GITHUB_STEP_SUMMARY
231+
232+
# Only show artifacts list if the build succeeded
233+
if [ "${{ env.BUILD_ARTIFACTS_RESULT }}" == "success" ]; then
234+
echo "### Built Artifacts" >> $GITHUB_STEP_SUMMARY
235+
echo "Direct links to artifacts produced by this build run:" >> $GITHUB_STEP_SUMMARY
236+
echo "" >> $GITHUB_STEP_SUMMARY
237+
echo "- [Documentation log]($ARTIFACT_URL_BASE/${{ env.DOCS_LOG_ID }})" >> $GITHUB_STEP_SUMMARY
238+
echo "- [Documentation Site]($ARTIFACT_URL_BASE/${{ env.DOCS_ID }})" >> $GITHUB_STEP_SUMMARY
239+
echo "- [Nuget Packages]($ARTIFACT_URL_BASE/${{ env.NUGET_ID }})" >> $GITHUB_STEP_SUMMARY
240+
echo "- [Symbols Packages]($ARTIFACT_URL_BASE/${{ env.SYMBOLS_ID }})" >> $GITHUB_STEP_SUMMARY
241+
echo "- [Assemblies]($ARTIFACT_URL_BASE/${{ env.ASSEMBLIES_ID }})" >> $GITHUB_STEP_SUMMARY
242+
echo "" >> $GITHUB_STEP_SUMMARY
243+
fi
244+
245+
# Conditionally add the Docker image tag to the summary
246+
if [ "${{ env.UPLOAD_DOCS_RESULT }}" == "success" ]; then
247+
echo "### Documentation Docker Image" >> $GITHUB_STEP_SUMMARY
248+
echo "A new documentation Docker image was pushed." >> $GITHUB_STEP_SUMMARY
249+
echo "" >> $GITHUB_STEP_SUMMARY
250+
echo "| Attribute | Value |" >> $GITHUB_STEP_SUMMARY
251+
echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY
252+
echo "| **Image Tag** | \`${{ env.DOCS_IMAGE_TAG }}\` |" >> $GITHUB_STEP_SUMMARY
253+
echo "| **Image Hash** | \`${{ env.DOCS_IMAGE_HASH }}\` |" >> $GITHUB_STEP_SUMMARY
254+
fi

.github/workflows/upload-docs.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021 Yubico AB
1+
# Copyright 2025 Yubico AB
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -14,8 +14,16 @@
1414

1515
name: Upload documentation to GCP
1616

17-
on:
17+
on:
1818
workflow_call:
19+
# Define an output for this reusable workflow
20+
outputs:
21+
image-tag:
22+
description: "The full tag of the pushed documentation Docker image"
23+
value: ${{ jobs.upload_docs.outputs.image-tag }}
24+
image-hash:
25+
description: "The image hash of the pushed documentation Docker image"
26+
value: ${{ jobs.upload_docs.outputs.image-hash }}
1927

2028
permissions:
2129
id-token: write
@@ -30,6 +38,10 @@ env:
3038
jobs:
3139
upload_docs:
3240
runs-on: ubuntu-latest
41+
# Define an output for this job
42+
outputs:
43+
image-tag: ${{ steps.push_image.outputs.imagetag }}
44+
image-hash: ${{ steps.push_image.outputs.imagehash }}
3345
steps:
3446
# Checkout the local repository as we need the Dockerfile and other things even for this step.
3547
- uses: actions/checkout@v4
@@ -44,7 +56,7 @@ jobs:
4456
- name: Docker build
4557
run: |
4658
docker build -t "${IMAGE_NAME}:${{ github.sha }}" .
47-
59+
4860
# Authenticate to Google Cloud
4961
- name: Authenticate
5062
uses: google-github-actions/auth@v2
@@ -54,8 +66,12 @@ jobs:
5466

5567
# Push our docker image to GCP
5668
- name: Push Docker image
69+
id: push_image # Add an ID to reference this step's outputs
5770
run: |
5871
gcloud auth configure-docker ${IMAGE_REGISTRY_URL} --project ${IMAGE_REGISTRY_PROJECT}
59-
docker tag "${IMAGE_NAME}:${{ github.sha }}" "${IMAGE_REGISTRY_URL}/${IMAGE_REGISTRY_PROJECT}/${IMAGE_REPOSITORY}/${IMAGE_NAME}:${{ github.sha }}"
60-
docker push "${IMAGE_REGISTRY_URL}/${IMAGE_REGISTRY_PROJECT}/${IMAGE_REPOSITORY}/${IMAGE_NAME}:${{ github.sha }}"
61-
echo "New image tag: ${{ github.sha }}"
72+
FULL_IMAGE_TAG="${IMAGE_REGISTRY_URL}/${IMAGE_REGISTRY_PROJECT}/${IMAGE_REPOSITORY}/${IMAGE_NAME}:${{ github.sha }}"
73+
docker tag "${IMAGE_NAME}:${{ github.sha }}" "${FULL_IMAGE_TAG}"
74+
docker push "${FULL_IMAGE_TAG}"
75+
# Use GITHUB_OUTPUT to make the full tag available to the job and workflow
76+
echo "imagetag=${FULL_IMAGE_TAG}" >> $GITHUB_OUTPUT
77+
echo "imagehash=${{ github.sha }}" >> $GITHUB_OUTPUT

Yubico.Core/src/Yubico.Core.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ limitations under the License. -->
118118
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
119119
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
120120
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
121-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
121+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
122122
<!-- Before updating PolySharp, we should do some due dilligence on the update -->
123123
<PackageReference Include="PolySharp" Version="1.15.0" AllowUpdates="false">
124124
<PrivateAssets>all</PrivateAssets>
125125
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
126126
</PackageReference>
127-
<PackageReference Include="System.Memory" Version="4.5.5" />
127+
<PackageReference Include="System.Memory" Version="4.6.3" />
128128
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
129129
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
130130
<!-- The wildcard version tag allows us to include the latest minor and pre-release versions -->

Yubico.Core/src/Yubico/PlatformInterop/Libraries.Net47.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
using System;
1818
using System.IO;
19+
using System.Runtime.InteropServices;
1920

2021
namespace Yubico.PlatformInterop
2122
{
@@ -72,9 +73,13 @@ private static class Net47Implementation
7273
private static string NativeShimsPath =>
7374
Path.Combine(
7475
AppDomain.CurrentDomain.BaseDirectory,
75-
Environment.Is64BitProcess
76-
? "x64"
77-
: "x86",
76+
RuntimeInformation.OSArchitecture switch
77+
{
78+
Architecture.X86 => "x86",
79+
Architecture.X64 => "x64",
80+
Architecture.Arm64 => "arm64",
81+
var unsupportedArch => throw new ArgumentOutOfRangeException($"Architecture {unsupportedArch } is not supported!")
82+
},
7883
NativeShims);
7984

8085
/// <summary>

Yubico.Core/src/Yubico/PlatformInterop/macOS/Interop.Libraries.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ namespace Yubico.PlatformInterop
1616
{
1717
internal static partial class Libraries
1818
{
19-
internal const string CoreFoundation = "CoreFoundation.framework/CoreFoundation";
20-
internal const string IOKitFramework = "IOKit.framework/IOKit";
21-
internal const string WinSCard = "PCSC.framework/PCSC";
19+
internal const string CoreFoundation = "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation";
20+
internal const string IOKitFramework = "/System/Library/Frameworks/IOKit.framework/IOKit";
21+
internal const string WinSCard = "/System/Library/Frameworks/PCSC.framework/PCSC";
2222
}
2323
}

Yubico.Core/tests/Yubico.Core.UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ limitations under the License. -->
4343
<DefineConstants>Linux</DefineConstants>
4444
</PropertyGroup>
4545
<ItemGroup>
46+
<PackageReference Include="NSubstitute" Version="5.3.0" />
4647
<ProjectReference Include="..\src\Yubico.Core.csproj" />
4748
<PackageReference Include="Xunit.SkippableFact" Version="1.4.13" />
4849
<PackageReference Include="coverlet.collector" Version="6.0.2" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
4950
<PackageReference Include="xunit" Version="2.8.1" />
5051
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
5152
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
52-
<PackageReference Include="Moq" Version="4.16.1" />
5353

5454
<None Update="appsettings.json">
5555
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

0 commit comments

Comments
 (0)