Update main.yml (#6)

This commit is contained in:
Jedd Morgan
2025-10-15 15:00:51 +01:00
committed by GitHub
parent eff10f3469
commit d8ba0b66e4
+14 -4
View File
@@ -2,14 +2,18 @@ name: .NET Build and Publish
on:
push:
branches: ["master"]
tags: ["*.*.*"]
jobs:
build:
runs-on: ubuntu-latest
environment:
name: 'nuget.org'
permissions:
id-token: write # enable GitHub OIDC token issuance for this job
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
filter: tree:0
@@ -28,6 +32,12 @@ jobs:
- name: 🔫 Build and Pack
run: ./build.sh pack
- name: NuGet login (OIDC → temp API key)
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: Push to nuget.org
run: dotnet nuget push output/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{secrets.CONNECTORS_NUGET_TOKEN }} --skip-duplicate
run: dotnet nuget push output/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{steps.login.outputs.NUGET_API_KEY}}