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
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write
packages: write

steps:
- name: Checkout
uses: actions/checkout@v5
Expand Down Expand Up @@ -61,13 +66,20 @@ jobs:
- name: Push
working-directory: ./src
# Publish CI packages from PRs and tagged releases
if: ${{ startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/pull/') }}
if: ${{ startsWith(github.ref, 'refs/tags/') || (startsWith(github.ref, 'refs/pull/')) && !github.event.pull_request.head.repo.fork }}
run: |
dotnet nuget add source --name github https://nuget.pkg.github.com/CenterEdge/index.json &&
dotnet nuget push **/*.${{ steps.gitversion.outputs.fullSemVer }}.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s github

- name: NuGet login (OIDC → temp API key)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: NuGet/login@v1
id: login
with:
Comment thread
brantburnett marked this conversation as resolved.
user: ${{ vars.NUGET_USER }}
Comment thread
brantburnett marked this conversation as resolved.

- name: Push to NuGet.org
working-directory: ./src
# Publish tagged releases to NuGet.org
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: dotnet nuget push **/*.${{ steps.gitversion.outputs.fullSemVer }}.nupkg -k ${{ secrets.NUGET_API_KEY }} -s nuget.org
run: dotnet nuget push **/*.${{ steps.gitversion.outputs.fullSemVer }}.nupkg -k ${{ steps.login.outputs.NUGET_API_KEY }} -s nuget.org
Comment thread
brantburnett marked this conversation as resolved.
Loading