Skip to content

Commit bb70320

Browse files
committed
CLOUDPLAT-3162: add npm OIDC publish workflow
https://mapbox.atlassian.net/browse/CLOUDPLAT-3162
1 parent 1e500a7 commit bb70320

3 files changed

Lines changed: 43 additions & 1 deletion

File tree

.github/workflows/npm-release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: NPM release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
npm-release:
8+
uses: mapbox/gha-public/.github/workflows/workflow-npm-oidc-publish.yml@main
9+
permissions:
10+
id-token: write
11+
contents: write
12+
with:
13+
create-github-release: true
14+
environment: npm-release
15+
run-tests: false

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Contributing to supercluster
2+
3+
## Development
4+
5+
```bash
6+
npm ci
7+
npm test
8+
```
9+
10+
## Releasing a new version
11+
12+
Releases are published to npm via GitHub Actions.
13+
14+
### Steps
15+
16+
1. **Bump the version** in `package.json` (follow [semver](https://semver.org))
17+
2. **Update `CHANGELOG.md`** with a summary of what changed
18+
3. **Open a PR**, get it reviewed and merged to `main`
19+
4. **Trigger the release** from the [Actions tab](../../actions/workflows/npm-release.yml):
20+
- Select **NPM release****Run workflow** → run from `main`
21+
22+
The workflow will publish to npm and create a GitHub release with auto-generated notes.
23+
24+
> **Note:** Only Mapbox maintainers with write access to this repository can trigger the release workflow. External contributors can open and contribute to PRs, but releases are always cut by the owning team.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "supercluster",
3-
"version": "8.0.1",
3+
"version": "8.0.2",
44
"description": "A very fast geospatial point clustering library.",
55
"main": "dist/supercluster.js",
66
"type": "module",
@@ -43,5 +43,8 @@
4343
"eslint-config-mourner": "^4.0.0",
4444
"mkdirp": "^3.0.1",
4545
"rollup": "^4.18.0"
46+
},
47+
"publishConfig": {
48+
"access": "public"
4649
}
4750
}

0 commit comments

Comments
 (0)