feat: add GitHub Actions CI/CD workflows and local test runner#6
Merged
Conversation
- ci.yml: triggers on push to develop/feature/fix/hotfix branches and PRs to develop/master; validates branch naming on PRs; builds and tests on net10.0; uploads test results (.trx) as artifacts - release.yml: triggers on push to master; build, test, extract version, guard against re-releasing, pack, GitHub Release, push to NuGet.org - ci-cd-test-run.ps1: local runner with lint/dry/ci/all modes and ci/release/both workflow selection; uses RUNNING_LOCALLY env var gate to skip upload-artifact when running under act
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions CI pipeline and a release workflow for Blazing.Json.Queryable, plus a PowerShell helper to run workflow linting and act runs locally.
Changes:
- Add CI workflow to validate branch naming on PRs, build, run tests, and upload TRX results.
- Add release workflow to build/test/pack and publish GitHub Releases + push packages to NuGet on
master. - Add
ci-cd-test-run.ps1to lint workflows viaactionlintand execute/dry-run them viaact.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
ci-cd-test-run.ps1 |
Local workflow runner that checks prerequisites, runs actionlint, and runs/dry-runs workflows with act. |
.github/workflows/ci.yml |
CI pipeline for restore/build/test and test-results artifact upload, including PR branch-name validation. |
.github/workflows/release.yml |
Release pipeline for restore/build/test/pack, GitHub Release creation, and NuGet package publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- release.yml: remove unused RUNNING_LOCALLY env block (no upload-artifact step in release workflow, so the variable was declared but never referenced) - release.yml: add --no-restore to dotnet pack (Restore step already ran; omitting it caused an implicit redundant restore) - ci-cd-test-run.ps1: update description wording — act uses push event so PR-only jobs (validate-branch) are not exercised locally; wording now accurately says 'approximates' rather than 'mirrors exactly' - ci-cd-test-run.ps1: guard -Job parameter to CI workflow only; if -Job is supplied with -Workflow release or both, emit a clear warning and skip the -j flag for the Release workflow to avoid act erroring on an unknown job name
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…to prevent static cache interference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds full GitHub Actions CI/CD pipeline and a local test runner script for
Blazing.Json.Queryable.What's included
.github/workflows/ci.ymldevelop,feature/**,fix/**,hotfix/**and PRs targetingdevelop/mastervalidate-branchjob (PR-only): enforcesfeature/,fix/, orhotfix/prefix (ordevelop)build-and-testjob: targetsnet10.0only (single TFM — no matrix needed)actions/checkout@v5·actions/setup-dotnet@v5(10.0.x) · restore → build → test → upload.trxartifacts--no-build --no-restoreondotnet test— no redundant rebuild after explicit Build stepenv.RUNNING_LOCALLY == ''— skipped underact, fatal on real GitHub Actions.github/workflows/release.ymlmaster.csproj→ guard against re-releasing an already-tagged version → pack → GitHub Release (ghCLI) → NuGet push.nupkgand.snupkg(symbols);DebugType=portablealready set in projectghCLI for GitHub Release (no third-party actions)ci-cd-test-run.ps1-Mode(lint/dry/ci/all) and-Workflow(ci/release/both) parametersRUNNING_LOCALLY=truepassed to everyactinvocation — prevents upload-artifact from running inside act whereACTIONS_RUNTIME_TOKENis unavailablemasterbranch filterTest-Tool 'docker'beforedocker info;dotnetis warn-only for act-backed modesValidation
All checks passed locally before opening this PR:
Required setup (one-time, before first release)
Add
NUGET_API_KEYas a repository secret:Settings → Secrets and variables → Actions → New repository secret
NUGET_API_KEYBlazing.Json.QueryableGITHUB_TOKENis provided automatically by GitHub Actions — no setup needed.