Skip to content

Commit 0dfcf03

Browse files
committed
actions: Trusted Publishing
1 parent f7e01b4 commit 0dfcf03

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.github/workflows/nuget-publish.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
jobs:
77
publish:
88

9+
permissions:
10+
id-token: write # enable GitHub OIDC token issuance for this job
11+
912
runs-on: ubuntu-latest
1013

1114
steps:
@@ -40,25 +43,31 @@ jobs:
4043
4144
################################
4245
# NUGET
46+
- name: Trusted Publishing (id-token permission required)
47+
uses: NuGet/login@v1
48+
id: login # --> ${{ steps.login.outputs.NUGET_API_KEY }}
49+
with:
50+
user: ${{ secrets.NUGET_LOGIN }}
51+
4352
- name: NuGet Publish
4453
run: |
4554
cd ./directives
4655
dotnet nuget push "bin/Release/*.nupkg" \
47-
-k ${{ secrets.NUGET_API_KEY }} \
56+
-k ${{ steps.login.outputs.NUGET_API_KEY }} \
4857
-s https://api.nuget.org/v3/index.json \
4958
--timeout 60
5059
cd ..
5160
5261
cd ./src
5362
dotnet nuget push "bin/Release/*.nupkg" \
54-
-k ${{ secrets.NUGET_API_KEY }} \
63+
-k ${{ steps.login.outputs.NUGET_API_KEY }} \
5564
-s https://api.nuget.org/v3/index.json \
5665
--timeout 60
5766
cd ..
5867
5968
cd ./cli
6069
dotnet nuget push "bin/Release/*.nupkg" \
61-
-k ${{ secrets.NUGET_API_KEY }} \
70+
-k ${{ steps.login.outputs.NUGET_API_KEY }} \
6271
-s https://api.nuget.org/v3/index.json \
6372
--timeout 60
6473
cd ..

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<PropertyGroup Label="NuGetPublishSettings">
8-
<NuGetPublishVersion>1.0.1</NuGetPublishVersion>
8+
<NuGetPublishVersion>1.0.2</NuGetPublishVersion>
99
<NuGetPublishVersionSuffix></NuGetPublishVersionSuffix>
1010
<!-- relative path from .csproj files, without trailing slash -->
1111
<NuGetPublishProjectRootRelPath>..</NuGetPublishProjectRootRelPath>

src/FUnit.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</None>
2020
</ItemGroup>
2121
<ItemGroup>
22-
<PackageReference Include="SatorImaging.Jsonable" Version="1.2.1">
22+
<PackageReference Include="SatorImaging.Jsonable" Version="1.2.2">
2323
<PrivateAssets>all</PrivateAssets>
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
</PackageReference>

0 commit comments

Comments
 (0)