Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

<!-- What this pull request changes, and why. Link the issue it closes: "Closes #12". -->

## Release notes

<!-- For a feat: or fix:, what users will notice, in a sentence or two. It goes under this pull request's entry in the GitHub release. Leave it empty for any other change. -->

## AI use

<!-- Required, for everyone. Tick exactly one box: the "AI disclosure" check fails until you do. -->
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ai-disclosure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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

Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,15 +208,15 @@ 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;
- [x] enforce Conventional Commits on pull request titles, which become the squash-merge commit, so every change is classified for semantic-release;
- [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`;
Expand Down
Loading