Skip to content

Commit 93abafa

Browse files
committed
CLOUDPLAT-3162: add npm OIDC publish workflow
https://mapbox.atlassian.net/browse/CLOUDPLAT-3162
1 parent 206762d commit 93abafa

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 tilelive-vector
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 `master`
19+
4. **Trigger the release** from the [Actions tab](../../actions/workflows/npm-release.yml):
20+
- Select **NPM release****Run workflow** → run from `master`
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": "@mapbox/tilelive-vector",
3-
"version": "4.2.0",
3+
"version": "4.2.1",
44
"main": "./index.js",
55
"description": "Vector tile => raster tile backend for tilelive",
66
"repository": {
@@ -39,5 +39,8 @@
3939
},
4040
"engine": {
4141
"node": ">4.0.0"
42+
},
43+
"publishConfig": {
44+
"access": "public"
4245
}
4346
}

0 commit comments

Comments
 (0)