Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
permissions:
packages: write
contents: read
id-token: write # enable GitHub OIDC token issuance for this job

steps:
- name: Checkout
Expand Down Expand Up @@ -46,8 +47,20 @@ jobs:
path: |
${{ github.workspace }}/src/CsvHelper/bin/Release/*.nupkg

- name: Prep packages
run: dotnet nuget add source --username marv51 --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/marv51/index.json"
# Get a short-lived NuGet API key
- name: NuGet login (OIDC -> temp API key)
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}


# Push the package
- name: NuGet push
run: dotnet nuget push src/CsvHelper/bin/Release/*.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

# - name: Prep packages
# run: dotnet nuget add source --username marv51 --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/marv51/index.json"

- name: Push package to GitHub packages
run: dotnet nuget push src/CsvHelper/bin/Release/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
# - name: Push package to GitHub packages
# run: dotnet nuget push src/CsvHelper/bin/Release/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"