Skip to content

Add CI publish job for NuGet packages to CodeArtifact - #5

Merged
Faisal-Bahoo merged 2 commits into
mainfrom
feature-ci-publish-codeartifact-release_20260820
Aug 20, 2026
Merged

Add CI publish job for NuGet packages to CodeArtifact#5
Faisal-Bahoo merged 2 commits into
mainfrom
feature-ci-publish-codeartifact-release_20260820

Conversation

@Faisal-Bahoo

Copy link
Copy Markdown

Summary

  • Extends the existing GitHub Actions CI workflow with a publish job
  • On push to main (after tests pass), authenticates via OIDC to the staging account (366391106850) and pushes NuGet packages to CodeArtifact mindtouch-deki/cxe-nuget
  • Includes a version-exists check: if the version in Scripts/set-lash-version.sh is already published, the job skips with a warning annotation — prevents duplicate publishes and makes it clear when a version bump is needed
  • Removes --skip-duplicate in favor of failing loudly if an unexpected conflict occurs

Prerequisites (completed)

  • IAM role github-lambdasharp-publish created in account 366391106850 with OIDC trust for repo:MindTouch/LambdaSharpTool:ref:refs/heads/main
  • Role has CodeArtifact publish permissions scoped to cxe-nuget repository only
  • Repo secret AWS_ROLE_ARN set on MindTouch/LambdaSharpTool

How it works

  1. Tests run on all PRs and pushes (unchanged)
  2. publish job only triggers on push to main
  3. Checks CodeArtifact for existing version → skips if already published
  4. Builds + packs all SDK libraries and LambdaSharp.Tool
  5. Pushes .nupkg files to CodeArtifact
  6. Verifies the package version is queryable

Version workflow

  • Code-only merges (no version bump): publish job passes with a warning "version already exists"
  • Release merges (version bumped in Scripts/set-lash-version.sh): publishes new packages

Test plan

  • Merge this PR to main — first run should detect 0.8.5.1 already exists and skip with warning
  • Bump version to 0.8.5.2 in a follow-up PR — merge should trigger actual publish
  • Verify dotnet tool install LambdaSharp.Tool --version 0.8.5.2 works from CodeArtifact

Context

Step 1 of the post-merge plan from PR #4 (Deki #38135). Next: update CD stage to re-add the LambdaSharp deploy step.

🤖 Generated with Claude Code

Extends the existing CI workflow with a publish job that:
- Runs only on push to main (after tests pass)
- Authenticates via OIDC to the staging account
- Checks if the version already exists before building
- Packs SDK libraries + LambdaSharp.Tool
- Pushes to CodeArtifact mindtouch-deki/cxe-nuget
- Verifies the published version

The publish job is idempotent — if the version in
Scripts/set-lash-version.sh already exists in CodeArtifact,
it skips with a warning annotation.

Issues: #5

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Faisal-Bahoo
Faisal-Bahoo marked this pull request as ready for review August 20, 2026 18:52
NuGet restore needs CodeArtifact access for internal packages.
Trust policy broadened to allow all refs (publish still gated
to main by workflow condition).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Faisal-Bahoo
Faisal-Bahoo merged commit 0a8eda9 into main Aug 20, 2026
4 of 5 checks passed
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