ci: replace auto and lerna with release-please#2689
Conversation
|
Hello! 👋 This repository uses Auto for releasing packages using PR labels. ✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs. |
| persist-credentials: false | ||
|
|
||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| if: ${{ steps.release.outputs.releases_created }} |
There was a problem hiding this comment.
Dealer's choice, but I think this would be less prone to mistakes if everything gated behind steps.release.outputs.releases_created was in a separate job:
- workflow has two jobs:
release-pleaseandrelease release-please:- runs just the
googleapis/release-please-actionaction - it has an output of
releases_created
- runs just the
release:- depends on the
release-pleasejob withneeds: release-please - and it only runs if it created a release -
if: jobs.release-please.outputs.releases_created
- depends on the
- that way all the individual steps don't need the
if: ...on them which could be error prone
thoughts?
There was a problem hiding this comment.
Ah I did this so we can gate release/stage behind a gh env. Two birds with one stone! 👍
| "release-type": "node", | ||
| "bump-minor-pre-major": true, | ||
| "bump-patch-for-minor-pre-major": false, | ||
| "include-component-in-tag": false, |
There was a problem hiding this comment.
include-component-in-tag: false would work? I think it might strip the component name out and lead to generic v7.x tags
There was a problem hiding this comment.
maybe rather "include-v-in-tag": false
There was a problem hiding this comment.
this can probably be removed
|
|
||
| publish: | ||
| needs: release | ||
| if: ${{ needs.release.outputs.releases_created }} |
There was a problem hiding this comment.
| if: ${{ needs.release.outputs.releases_created }} | |
| if: ${{ needs.release.outputs.releases_created == 'true' }} |
| branches: [main] | ||
|
|
||
| jobs: | ||
| release: |
There was a problem hiding this comment.
should probably also get a concurrency group
What this PR does / why we need it:
Bye bye auto. 🤖 Bye bye lerna. 🐉 Bye bye labels. 🏷️ 👋 👋 👋
PR 3 of the Auto → release-please migration epic. Replaces Auto with
googleapis/release-please-action@v4driving a PR-driven release lifecycle. release-please opens a long-running release PR; merging it triggers per-package tags, GitHub Releases, and staged npm publishing via OIDC.Changes in scope:
release-please-config.jsondeclaring the 10 published packages, with thenode-workspaceplugin for cross-package dep updates,tag-separator: "@"to preserve the existing@grafana/<pkg>@<version>tag format, andbump-minor-pre-major: trueto mimic Auto's 0.x behaviour.release-please-manifest.jsonseeded from current npm-registry versions.github/workflows/release-please.yml— runs release-please-action; on releases (gated by gh env requiring review from frontend-platform or catalog team member), builds, runsnpm stage publish, posts a Slack notification with links to GH releases + npm pages.github/workflows/check-release-config.yml— fails PRs that touchpackages/**without a matching entry inrelease-please-config.jsonreleasejob from.github/workflows/ci.ymlauto,@auto-it/*, andlernadevDeps; hoistsnxas a direct devDep (was transitive via Lerna).autorc,lerna.json, rootCHANGELOG.mdCONTRIBUTING.md"Create A Release" section for the new flow + Conventional Commit PR-title conventionAGENTS.mdtech-stack lineNx >=21→Nx >=22to match the installed majorWhich issue(s) this PR fixes:
related: #2685
Special notes for your reviewer: