diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 2ab73af..a720fea 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,6 +2,10 @@ +## Release notes + + + ## AI use diff --git a/.github/workflows/ai-disclosure.yml b/.github/workflows/ai-disclosure.yml index ad90fa9..25aacf0 100644 --- a/.github/workflows/ai-disclosure.yml +++ b/.github/workflows/ai-disclosure.yml @@ -13,4 +13,4 @@ permissions: {} jobs: ai-disclosure: name: AI disclosure - uses: modulane/workflows/.github/workflows/ai-disclosure.yml@8a5ecaa4dc296a9e04849212ec06ddeec2a2480b # v1.0.0 + uses: modulane/workflows/.github/workflows/ai-disclosure.yml@257e72d8c09ea09b3fb0831124d667e7e7e1a915 # v1.1.0 diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 1963585..5d8ccfc 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -15,7 +15,7 @@ permissions: {} jobs: labels: name: Labels - uses: modulane/workflows/.github/workflows/labels.yml@8a5ecaa4dc296a9e04849212ec06ddeec2a2480b # v1.0.0 + uses: modulane/workflows/.github/workflows/labels.yml@257e72d8c09ea09b3fb0831124d667e7e7e1a915 # v1.1.0 permissions: contents: read # read .github/labels.json issues: write # create and edit labels diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index 6362250..fc2968e 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -16,6 +16,6 @@ permissions: {} jobs: pr-labels: name: Pull request labels - uses: modulane/workflows/.github/workflows/pr-labels.yml@8a5ecaa4dc296a9e04849212ec06ddeec2a2480b # v1.0.0 + uses: modulane/workflows/.github/workflows/pr-labels.yml@257e72d8c09ea09b3fb0831124d667e7e7e1a915 # v1.1.0 permissions: pull-requests: write # add and remove labels, assign the author diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index e8fefb0..87a399b 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -12,7 +12,7 @@ permissions: {} jobs: pr-title: name: Pull request title - uses: modulane/workflows/.github/workflows/pr-title.yml@8a5ecaa4dc296a9e04849212ec06ddeec2a2480b # v1.0.0 + uses: modulane/workflows/.github/workflows/pr-title.yml@257e72d8c09ea09b3fb0831124d667e7e7e1a915 # v1.1.0 permissions: contents: read # list the files of a pull request in a private repository pull-requests: read # read the pull request title and its files diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c21323..fbc22f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,8 @@ name: Release # Every push to main runs the CI workflow, then publishes once it has passed, # in the same run and from the same commit. semantic-release decides from the # commit messages whether a release is needed: fix: and feat: commits publish, -# docs:, style: and chore: do not. +# docs:, style: and chore: do not. The Release notes job then adds each pull +# request's notes to the GitHub release. # The manual trigger remains available as a fallback, and its dry run shows # what the next release would be without publishing anything. on: @@ -109,3 +110,14 @@ jobs: else npx --no-install semantic-release fi + + release-notes: + name: Release notes + needs: release + # A dry run creates no release to add notes to. + if: ${{ !inputs.dry-run }} + uses: modulane/workflows/.github/workflows/release-notes.yml@257e72d8c09ea09b3fb0831124d667e7e7e1a915 # v1.1.0 + permissions: + contents: write # edit the GitHub releases + issues: read # list the issues a pull request closes + pull-requests: read # read the pull request descriptions diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index b68f729..31e0b30 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -13,6 +13,6 @@ permissions: {} jobs: zizmor: name: Workflow security - uses: modulane/workflows/.github/workflows/zizmor.yml@8a5ecaa4dc296a9e04849212ec06ddeec2a2480b # v1.0.0 + uses: modulane/workflows/.github/workflows/zizmor.yml@257e72d8c09ea09b3fb0831124d667e7e7e1a915 # v1.1.0 permissions: contents: read # read the workflows diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94386dd..3c4e85f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -90,6 +90,8 @@ Every change is made on a short-lived branch and reaches `main` through a pull r 4. The maintainer reviews it. A pull request needs the maintainer's approval, given after its last push, and every review conversation resolved. A new push dismisses an earlier approval. The first workflow run of a first-time contributor also waits for the maintainer's approval. 5. The maintainer squash-merges it. The pull request title becomes the only commit on `main`. +For a `feat:` or `fix:`, fill in the **Release notes** section of the pull request template: what users will notice, in a sentence or two. It appears under the pull request's entry in the GitHub release, so the title says what changed and the notes say what it means for users. Leave it empty for any other change. + The pull request title decides what is released, so choose its type carefully: | Title starts with | Release | @@ -100,7 +102,7 @@ The pull request title decides what is released, so choose its type carefully: Keep the summary lowercase and in the imperative: `feat: add project search`, not `Feat: Added project search`. -**Do not mark changes as breaking before 1.0.0.** A `!` after the type (`feat!:`) or a `BREAKING CHANGE:` footer makes a major release, which would publish 1.0.0 early. Until then, describe incompatible changes in the pull request and release them as `feat:`. +**Do not mark changes as breaking before 1.0.0.** A `!` after the type (`feat!:`) or a `BREAKING CHANGE:` footer makes a major release, which would publish 1.0.0 early. Until then, describe incompatible changes in the pull request's **Release notes** section and release them as `feat:`. ### AI use @@ -141,6 +143,9 @@ Releases are fully automated with [semantic-release](https://semantic-release.gi 5. Otherwise it computes the next version and: - publishes the package to npm through [trusted publishing](https://docs.npmjs.com/trusted-publishers), so no npm token is stored in the repository, and with a provenance attestation linking the package to this workflow run; - creates the `vX.Y.Z` git tag and a GitHub release with notes generated from the commits. +6. A last job adds detail to the GitHub release: under each pull request's entry, the **Release notes** section of its description and the issues it closes. It handles each release once, so running the Release workflow by hand fills in any release it missed. + +The [GitHub releases](https://github.com/modulane/dev-workspace-cli/releases) are the changelog. There is no `CHANGELOG.md`: semantic-release would have to commit it to `main`, which the `main` ruleset only accepts through a pull request. The version in `package.json` is always `0.0.0-development`. The real version exists only in git tags and on npm; semantic-release writes it into the package at publish time. diff --git a/README.md b/README.md index ce722ea..662cbff 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Dev Workspace CLI requires [Node.js](https://nodejs.org/) 22.13 or newer in the npm install --global @modulane/dev-workspace-cli ``` -This installs two equivalent commands, `dev-workspace` and the shorter `dws`. +This installs two equivalent commands, `dev-workspace` and the shorter `dws`. Run the same command again to update. What changed in each version is in the [GitHub releases](https://github.com/modulane/dev-workspace-cli/releases). ## Quick start diff --git a/ROADMAP.md b/ROADMAP.md index 492f68f..13ab9fd 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -208,7 +208,7 @@ No new features; this milestone makes the existing ones dependable, then freezes - [ ] **End-to-end tests:** spawn the real binary on every operating system in CI, covering flags, direct mode, exit codes and non-TTY behaviour. - [ ] **Signal handling:** SIGINT and SIGTERM are forwarded correctly, and no child process is left behind when the terminal closes. - [ ] **Performance budget:** startup to first menu in under 150 ms, checked in CI. -- [ ] **Release safety:** +- [x] **Release safety:** - [x] publish automatically once CI passes on `main`, in the same workflow run and from the same commit; - [x] publish with the npm bundled with Node.js 24, checked to be 11.5.1 or newer, instead of installing `npm@latest`; - [x] run `npm run check` (not only `npm test`) before publishing; @@ -216,7 +216,7 @@ No new features; this milestone makes the existing ones dependable, then freezes - [x] pin every action to a full commit SHA, kept up to date by Dependabot, and audit the workflows with zizmor on pull requests; - [x] give the publish job only the permissions it needs, with no git credential on disk and no dependency install scripts while it can request an OIDC token; - [x] require the `CI passed` and `Conventional Commit title` checks in the `main` ruleset, so a pull request with failing CI cannot be merged; - - publish a `CHANGELOG.md` with `@semantic-release/changelog`. + - [x] publish a detailed changelog as the GitHub releases: each entry gets the release notes written in its pull request and the issues it closes ([#49](https://github.com/modulane/dev-workspace-cli/issues/49)). A committed `CHANGELOG.md` is not possible, because the `main` ruleset accepts changes only through pull requests. - [x] **Contributor files:** - [x] `CONTRIBUTING.md` with the development setup, workflow and release process; - [x] labels defined in `.github/labels.json`, applied to pull requests from their title, with reviews requested through `CODEOWNERS`;