@buildinternet/releases 0.81.1 → 0.83.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -132,7 +132,7 @@ releases login --no-browser # print the URL + code to open yourself (headless /
|
|
|
132
132
|
|
|
133
133
|
This uses the OAuth 2.0 Device Authorization Grant (RFC 8628): approve a short code at [releases.sh/device](https://releases.sh/device) in a signed-in browser, and a read-only key is saved to `~/.releases/credentials` (`0600`) — **the browser session itself is never saved**, only that key. Manage keys with `releases keys list` / `create` / `revoke`; each of those opens its own fresh browser approval and signs out again once the command finishes, rather than reusing a stored session (add `--no-browser` to print the URL + code instead, same as `login`).
|
|
134
134
|
|
|
135
|
-
If you've verified ownership of a source's domain, mint a `publish-token` scoped to that one source
|
|
135
|
+
If you've verified ownership of a source's domain, mint a `publish-token` scoped to that one source. The [`publish-changelog` GitHub Action](https://releases.sh/docs/integrations/github-actions) and `releases publish` both read it as `RELEASES_API_TOKEN`. Like `releases keys`, this opens its own browser approval each time:
|
|
136
136
|
|
|
137
137
|
```bash
|
|
138
138
|
releases publish-token create --source src_… | gh secret set RELEASES_API_TOKEN
|
|
@@ -142,11 +142,45 @@ releases publish-token revoke <id>
|
|
|
142
142
|
|
|
143
143
|
Already issued a token (e.g. a write/admin key during the closed beta)? Store it without the browser flow via `releases auth login` (interactive, `--token <token>`, or `--token -` for stdin); it's verified before being saved. `releases auth status` shows the current state (`whoami` is an alias). `RELEASES_API_KEY` in the environment overrides any stored credential — handy for CI.
|
|
144
144
|
|
|
145
|
+
## Publish from any CI
|
|
146
|
+
|
|
147
|
+
`releases publish` pushes changelog updates with `POST /v1/sources/…/releases/batch` (`mode: upsert-content`) — the same request as the [publish-changelog GitHub Action](https://releases.sh/docs/integrations/github-actions), for GitLab CI, Buildkite, or a local docs build.
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
releases publish --source src_… --dry-run
|
|
151
|
+
releases publish --source acme/docs --changelog CHANGELOG.md --since "$CI_COMMIT_BEFORE_SHA" \
|
|
152
|
+
--url-template "https://gitlab.com/acme/app/-/blob/main/CHANGELOG.md#{key}"
|
|
153
|
+
releases publish --source src_… --glob "changelog/**/*.mdx"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
`--dry-run` prints the batch body and does not call the API (no token required). A real publish reads `RELEASES_API_TOKEN` and exits if it is missing. `--since <sha>` limits the plan to entries changed since that commit; omit it, or pass an all-zero first-push SHA, to publish every parsed entry. Repeating a publish is safe: unchanged bodies are not written again.
|
|
157
|
+
|
|
158
|
+
Single-file mode parses versioned `##` headings (Keep a Changelog, conventional-changelog) and `## Month D, YYYY` sections. `--glob` switches to one MDX or Markdown file per release, with metadata in YAML frontmatter (`draft: true` is skipped). Deleted files are reported and left in the index.
|
|
159
|
+
|
|
160
|
+
The commit you pass to `--since` has to be in the local clone (`fetch-depth: 0` on GitHub, or GitLab's default full clone). `--url-template` accepts `{key}`, `{version}`, `{date}`, `{path}`, and `{slug}`. When `GITHUB_REPOSITORY` is set and the template is omitted, the URL falls back to the file's GitHub blob URL, same as the Action.
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
# .gitlab-ci.yml
|
|
164
|
+
publish-changelog:
|
|
165
|
+
image: node:22
|
|
166
|
+
rules:
|
|
167
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
168
|
+
changes: [CHANGELOG.md]
|
|
169
|
+
script:
|
|
170
|
+
- npm install -g @buildinternet/releases
|
|
171
|
+
- |
|
|
172
|
+
releases publish \
|
|
173
|
+
--source "$RELEASES_SOURCE" \
|
|
174
|
+
--since "$CI_COMMIT_BEFORE_SHA" \
|
|
175
|
+
--url-template "https://gitlab.com/${CI_PROJECT_PATH}/-/blob/${CI_COMMIT_REF_NAME}/CHANGELOG.md#{key}"
|
|
176
|
+
```
|
|
177
|
+
|
|
145
178
|
## Environment
|
|
146
179
|
|
|
147
180
|
Reader access requires nothing. Useful overrides:
|
|
148
181
|
|
|
149
182
|
- `RELEASES_API_KEY` — Bearer token for write endpoints; overrides stored credentials.
|
|
183
|
+
- `RELEASES_API_TOKEN` — write-scoped publish token for `releases publish` (see [Publish from any CI](#publish-from-any-ci)).
|
|
150
184
|
- `RELEASES_API_URL` — override the default `https://api.releases.sh` (e.g. staging).
|
|
151
185
|
- `RELEASES_TELEMETRY_DISABLED=1` — opt out of anonymous usage pings (`DO_NOT_TRACK=1` also honored).
|
|
152
186
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buildinternet/releases",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.83.0",
|
|
4
4
|
"description": "The changelog & release-notes registry for developers and AI agents",
|
|
5
5
|
"bin": {
|
|
6
6
|
"releases": "bin/releases"
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"README.md"
|
|
14
14
|
],
|
|
15
15
|
"optionalDependencies": {
|
|
16
|
-
"@buildinternet/releases-darwin-arm64": "0.
|
|
17
|
-
"@buildinternet/releases-darwin-x64": "0.
|
|
18
|
-
"@buildinternet/releases-linux-x64": "0.
|
|
19
|
-
"@buildinternet/releases-linux-arm64": "0.
|
|
20
|
-
"@buildinternet/releases-windows-x64": "0.
|
|
16
|
+
"@buildinternet/releases-darwin-arm64": "0.83.0",
|
|
17
|
+
"@buildinternet/releases-darwin-x64": "0.83.0",
|
|
18
|
+
"@buildinternet/releases-linux-x64": "0.83.0",
|
|
19
|
+
"@buildinternet/releases-linux-arm64": "0.83.0",
|
|
20
|
+
"@buildinternet/releases-windows-x64": "0.83.0"
|
|
21
21
|
},
|
|
22
22
|
"keywords": [
|
|
23
23
|
"changelog",
|