Skip to content

FEAT: (GH Actions) CI and Release pipelines#15

Open
sassdawe wants to merge 3 commits into
Polyglossy:mainfrom
sassdawe:pr/01-gha-bootstrap
Open

FEAT: (GH Actions) CI and Release pipelines#15
sassdawe wants to merge 3 commits into
Polyglossy:mainfrom
sassdawe:pr/01-gha-bootstrap

Conversation

@sassdawe

Copy link
Copy Markdown
Member

This pull request introduces a new, modernized GitHub Actions CI/CD pipeline for building, testing, and publishing the project. It replaces previous CI systems with a modular, reusable, and platform-aware workflow, supporting both Windows and Linux runners, and adds robust publishing automation for NuGet, npm, and VSCode extensions. The changes improve maintainability, reproducibility, and release reliability.

CI/CD Pipeline Modernization

  • Introduced a new reusable composite action (.github/actions/build-and-test) that handles cross-platform setup, build, test, and artifact packaging for both Windows and Linux environments. This action manages .NET, Node.js, npm, symlinks, caching, and test reporting.
  • Added a new CI workflow (.github/workflows/ci.yml) that uses matrix builds to test on both windows-latest and ubuntu-latest, triggers on pushes, pull requests, scheduled runs, and manual dispatch, and uploads build artifacts and test results for inspection.

Automated Release and Publishing

  • Added a new publish workflow (.github/workflows/publish.yml) that builds and tests on tag pushes and manual triggers, then automates publishing to NuGet, npm, and VSCode Marketplace, with support for dry-run simulation and safety checks (e.g., version matching, NuGet propagation waiting).
  • Ensured all publish jobs use proper concurrency controls, environment isolation, and artifact handling, with clear separation of build, package, and publish steps.

Reliability and Security Improvements

  • Improved permissions scoping (e.g., contents: read, checks: write, id-token: write only where needed), and ensured secrets are only exposed to jobs requiring them. [1] [2]
  • Added robust error handling, version validation, and artifact retention policies to help with traceability and debugging. [1] [2]

@sassdawe

Copy link
Copy Markdown
Member Author

This PR will require 2 other PRs which I can't create before this is merged as they are chained to reach a point where everything will run and build as expected.

See https://github.com/sassdawe/Polyglossy-interactive/actions/runs/29682622729 as I had it all working, but had to split it into multiple PRs

- name: Cache NuGet packages
uses: actions/cache@v5
with:
# CI scripts use a repo-local NuGet cache to keep restore inputs deterministic.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that this is either true or useful. It does follow the Arcade pattern but this tends to increase the difference between CI builds and local builds, which can lead to debugging challenges when one of them breaks.

with:
dotnet-version: '10.0.x'

- name: Push NuGet packages

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatically publishing packages to nuget.org can cause a lot of clutter and I've often seen it result in publishing packages that actually shouldn't be published.

Generally, automatically publishing to a feed is useful, but not to nuget.org. I usually prefer doing this manually because it's a much less frequent occurrence and a good place for some human review, especially because of some of the project's gaps in UI testing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...or maybe I misunderstood and this action is intended to be triggered manually.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll need to set credentials anyways first, but yes this should be triggered by tagging only - or manually to simulate.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants