You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our current release process is for a core maintainer to run npx nx release --yes in main branch (requires npm login and GITHUB_TOKEN in .env).
We've previously spent quite a lot of effort in releasing via GitHub Actions, but never quite got it working reliably. A partially broken release is complex to recover from, so running a command locally proved to be more practical.
But our current release process relies too much on one person, and doesn't allow us to secure npm publishing via provenance or trusted publishing.
Acceptance criteria
run nx release on push to main branch
release is skipped if no user-facing commits (feat, fix, perf) were pushed
remote:
remote: - Changes must be made through a pull request.
To https://github.com/code-pushup/cli
! [remote rejected] main -> main (protected branch hook declined)
! [remote rejected] v0.80.0 -> v0.80.0 (atomic transaction failed)
error: failed to push some refs to 'https://github.com/code-pushup/cli'
I temporarily disabled branch protection to make the 0.80.0 release go through on re-run. But it looks like we'll need to authenticate with a GitHub App instead.
The publish.ymlfailed initially because of release environment restrictions to main branch. I fixed this by adding v*.*.* tag patterns, and then adding a ruleset which restricts who can push these version tags.
I did a final test with our 0.80.2 release, both Release and Publish worked as expected.
Activity
BioPhoton commentedon Sep 12, 2025
🔥🔥🔥🔥
matejchalk commentedon Sep 24, 2025
Re-opening as it turns out the github action bot can't push to
main(see CI error):I temporarily disabled branch protection to make the
0.80.0release go through on re-run. But it looks like we'll need to authenticate with a GitHub App instead.matejchalk commentedon Sep 26, 2025
Finally got it working 🎉
The fixes are documented in the following PRs:
The
publish.ymlfailed initially because ofreleaseenvironment restrictions tomainbranch. I fixed this by addingv*.*.*tag patterns, and then adding a ruleset which restricts who can push these version tags.I did a final test with our
0.80.2release, both Release and Publish worked as expected.