Skip to content

Commit 6945ea0

Browse files
committed
Use trusted publishing
1 parent ea60cc2 commit 6945ea0

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

.github/workflows/auto_build.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@ jobs:
1414
- name: Setup .NET Core
1515
uses: actions/setup-dotnet@v3
1616
with:
17-
dotnet-version: |
18-
6
19-
7
20-
8
17+
dotnet-version: 10
2118

2219
- name: Build
2320
run: dotnet build -c release

.github/workflows/release.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
name: Release
22
on:
3-
workflow_dispatch:
4-
branches: [ master ]
3+
workflow_dispatch
4+
55

66

77
jobs:
88
build:
9+
10+
permissions:
11+
id-token: write # enable GitHub OIDC token issuance for this job
12+
913
runs-on: ubuntu-latest
14+
1015
steps:
1116

1217
- name: Checkout
@@ -15,13 +20,16 @@ jobs:
1520
- name: Setup .NET Core
1621
uses: actions/setup-dotnet@v3
1722
with:
18-
dotnet-version: |
19-
6
20-
7
21-
8
23+
dotnet-version: 10
24+
25+
- name: NuGet login
26+
uses: NuGet/login@v1
27+
id: login
28+
with:
29+
user: jasondavis303
2230

2331
- name: Build
2432
run: |
2533
dotnet pack -c release -o nuget -p:Version=1.60.0.${{ github.run_number }}
26-
dotnet nuget push "nuget/*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
34+
dotnet nuget push "nuget/*.nupkg" -k ${{steps.login.outputs.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
2735

0 commit comments

Comments
 (0)