Skip to content

ci: push the SDK through nuget.org trusted publishing - #38

Open
mmalkhatib wants to merge 1 commit into
mainfrom
muhannad/nuget-trusted-publishing
Open

mmalkhatib wants to merge 1 commit into
mainfrom
muhannad/nuget-trusted-publishing

Conversation

@mmalkhatib

Copy link
Copy Markdown
Contributor

Why

The org's SWNUGETKEY nuget.org API key has expired, so the SDK push from this pipeline now fails with 403. SW-EfCoreExtensions hit it first: simplify9/SW-EfCoreExtensions#76.

What

  • The shared reusable-service-cicd.yml no longer pushes the SDK: nuget-projects is empty, and the build and tests still run there.
  • A nuget job in this file runs after it. It logs in with NuGet/login@v1 (OIDC → one-hour key, NUGET_USER) and pushes the SDK with the version the shared workflow computed.
  • Why: nuget.org requires the OIDC token's job_workflow_ref to be in this repository, which the shared workflow's isn't (Support for reusable workflows in different repositories NuGet/login#24).
  • Behaviour change: the SDK is now pushed after the deploy succeeds, where before it was pushed in parallel with it. A failed push can be re-run on its own; --skip-duplicate makes that safe.

Before merging

A nuget.org trusted-publishing policy for this repo:

  • Policy owner: simplify9
  • Repository owner: simplify9
  • Repository: SW-Surl-api
  • Workflow: ci-cd.yml

The repository variable NUGET_USER is set.

The org's SWNUGETKEY API key has expired, so the SDK push to nuget.org now
fails with 403. Trusted publishing trades the job's OIDC token for a one-hour
key, so nothing stored can expire. nuget.org requires the token's
job_workflow_ref to be in this repository, so the shared service workflow no
longer pushes (its nuget-projects is empty; build and tests still run there)
and a nuget job here logs in with NuGet/login (NUGET_USER) and pushes the SDK
with the version the shared workflow computed.
@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5c29ca87-7d62-4f4b-9cd0-cbdf8a357de0
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant