Skip to content

Commit 0fd9359

Browse files
committed
Publish VbaCompression packages to NuGet.org using OICD integration
1 parent 251c62b commit 0fd9359

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
tags: [ 'v*.*.*' ]
66

77
permissions:
8+
id-token: write
89
contents: write
910

1011
env:
@@ -21,6 +22,10 @@ jobs:
2122
release:
2223
runs-on: ubuntu-22.04
2324

25+
environment:
26+
name: production
27+
url: https://www.nuget.org/packages/NetOfficeFw.VbaCompression
28+
2429
steps:
2530
- name: checkout
2631
uses: actions/checkout@v4
@@ -50,12 +55,18 @@ jobs:
5055
${{ github.workspace }}/dist
5156
${{ github.workspace }}/src/Kavod.Vba.Compression/README.md
5257
58+
- name: authenticate nuget.org
59+
uses: NuGet/login@v1
60+
id: nuget
61+
with:
62+
user: ${{ secrets.NUGET_PUSH_USER }}
63+
5364
- name: publish
5465
working-directory: '${{ github.workspace}}/dist'
5566
run: |
56-
dotnet nuget push "*.nupkg" --api-key "$NUGET_PUSH_KEY" --source https://api.nuget.org/v3/index.json
67+
dotnet nuget push "*.nupkg" --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json
5768
env:
58-
NUGET_PUSH_KEY: ${{ secrets.NUGET_PUSH_KEY }}
69+
NUGET_API_KEY: ${{ steps.nuget.outputs.NUGET_API_KEY }}
5970

6071
- name: release
6172
uses: softprops/action-gh-release@v2

0 commit comments

Comments
 (0)