fix: repair release workflow, cumulative changelog, and supply chain hardening#194
Merged
elantiguamsft merged 2 commits intomainfrom Apr 7, 2026
Merged
Conversation
Eliminate all third-party GitHub Actions to contain the supply chain. Only official actions/* and the pre-installed gh CLI are used now. Supply chain cleanup: - Remove tj-actions/github-changelog-generator — replaced with gh API (repos/generate-notes) plus gh release list/view for cumulative history - Remove softprops/action-gh-release — replaced with gh release create - Remove svenstaro/upload-release-action — replaced with gh release upload Action version upgrades: - actions/checkout: v3/v4 -> v6 - actions/setup-dotnet: v3 -> v5 - actions/upload-artifact and download-artifact remain at v4 (latest) Bug fixes: - Filter tags with grep to only match well-formed vX.Y.Z(-preN) format, fixing the sort that returned malformed tag 'v.1.5.5' instead of v1.7.6 - Replace all deprecated '::set-output' with GITHUB_OUTPUT - Remove unused upload_url output Changelog is now cumulative: each release body includes the delta for the current release (via GitHub generate-notes API) plus the full body text of all previous releases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The changelog is now generated at release time via the GitHub API and stored in each release body. The committed file is no longer needed as the source of truth — point readers to the Releases page instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
elantiguamsft
approved these changes
Apr 7, 2026
NN2000X
approved these changes
Apr 7, 2026
JeromySt
pushed a commit
that referenced
this pull request
Apr 8, 2026
Apply the same supply chain fixes from PR #194 to all remaining workflows: - dotnet-v1.yml, dotnet-v2.yml: replace tj-actions, softprops, svenstaro with gh CLI equivalents; cumulative changelog via GitHub API - codeql.yml, dependency-review.yml, rerelease.yml: bump action versions - All workflows now use only official actions/* and gh CLI - checkout@v6, setup-dotnet@v5 across the board Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
The automated release pipeline has been broken since at least v1.7.2 — every push-to-main workflow run fails at the
Increment pre-release tagstep, meaning all recent releases (v1.7.2 through v1.7.6) were created manually. This PR fixes the root cause, hardens the supply chain by eliminating all third-party GitHub Actions, and ensures the changelog is cumulative across releases.Problems Fixed
1. Broken tag discovery (root cause of all release failures)
The workflow used
git tag | sort --version-sort | tail -n1to find the latest tag. GNUsort --version-sortincorrectly sorted the malformed tagv.1.5.5(note the extra dot) as the highest version, ahead of legitimate tags likev1.7.6. The tag regex^v([0-9]+\.[0-9]+\.[0-9]+)(-pre([0-9]+))?$then failed to match, causing every run to exit withInvalid tag format.Fix: Added a
grep -Efilter to select only well-formedvX.Y.Z(-preN)tags before sorting, so malformed tags likev.1.5.5and1.6.2are excluded.2. Third-party action supply chain risk
The workflow depended on three third-party actions from individual maintainers:
tj-actions/github-changelog-generator@v1.19softprops/action-gh-release@v2svenstaro/upload-release-action@v2Each of these is a potential supply chain vector — a compromised release of any one could exfiltrate secrets or tamper with build artifacts.
Fix: Replaced all three with the
ghCLI, which is pre-installed on every GitHub-hosted runner and maintained by GitHub:tj-actions/github-changelog-generator@v1.19gh api repos/.../releases/generate-notes+gh release list/viewsoftprops/action-gh-release@v2gh release createsvenstaro/upload-release-action@v2gh release upload3. Deprecated APIs and actions
::set-output(deprecated since Oct 2022, scheduled for removal) was used in 3 places → replaced with\actions/create-release@v1(archived, no longer maintained) → replaced withgh release create4. Outdated action versions
actions/checkoutactions/setup-dotnetactions/upload-artifactactions/download-artifact5. Cumulative changelog
Previously, the changelog was generated by a third-party action and committed to the repo. Since the org-level branch protection ruleset blocks direct pushes to main (even from
GITHUB_TOKEN), this approach was already broken — PR #189 moved it to an artifact, but each release body only contained the delta.New approach: The changelog is now built entirely from the GitHub API:
gh api repos/.../releases/generate-notesgenerates the "What's Changed" delta for the new releasegh release list+gh release viewfetches the body text of all previous releasesCHANGELOG.mdartifactgh release create --notes-fileuses it as the release bodyEach release body now contains the full project history, not just the latest delta.
6. Stale CHANGELOG.md removed
The 797-line committed
CHANGELOG.mdwas stale (last updated at v1.7.2) and no longer the source of truth. Replaced with a 5-line pointer to the Releases page.What's NOT changed
Testing
The workflow changes can only be fully validated by a push-to-main event. The PR itself will trigger the
buildjob (unchanged) and thecreate_changelogjob (which no-ops on PRs by design).