Skip to content

Commit 80651f2

Browse files
chore(ci): switch to oidc (#96)
1 parent acc1a52 commit 80651f2

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.github/workflows/cicd.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ on:
1111
types: [opened, reopened, synchronize]
1212
merge_group:
1313

14+
permissions:
15+
id-token: write
16+
contents: write
17+
actions: write
18+
checks: write
19+
issues: write
20+
1421
jobs:
1522
build-test:
1623
name: Build & Test & Release
@@ -28,7 +35,7 @@ jobs:
2835
uses: docker/setup-buildx-action@v3
2936

3037
- name: Semantic Release Dry Run
31-
uses: cycjimmy/semantic-release-action@v4
38+
uses: cycjimmy/semantic-release-action@v5
3239
id: semantic
3340
with:
3441
dry_run: true
@@ -87,16 +94,23 @@ jobs:
8794

8895
- name: Semantic Release
8996
if: steps.semantic.outputs.new_release_published == 'true'
90-
uses: cycjimmy/semantic-release-action@v4
97+
uses: cycjimmy/semantic-release-action@v5
9198
env:
9299
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93100
with:
94101
extra_plugins: |
95102
conventional-changelog-conventionalcommits
96103
104+
- name: NuGet login (OIDC → temp API key)
105+
if: steps.semantic.outputs.new_release_published == 'true'
106+
uses: NuGet/login@v1
107+
id: login
108+
with:
109+
user: IvanJosipovic
110+
97111
- name: .NET NuGet Push
98112
if: steps.semantic.outputs.new_release_published == 'true'
99-
run: dotnet nuget push src/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
113+
run: dotnet nuget push src/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{steps.login.outputs.NUGET_API_KEY}}
100114

101115
- name: Docker Push
102116
if: steps.semantic.outputs.new_release_published == 'true'

0 commit comments

Comments
 (0)