Skip to content

Commit dbb117b

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

3 files changed

Lines changed: 44 additions & 2 deletions

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 pixelmatch
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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pixelmatch",
3-
"version": "7.2.0",
3+
"version": "7.2.1",
44
"type": "module",
55
"description": "The smallest and fastest pixel-level image comparison library.",
66
"main": "index.js",
@@ -38,5 +38,8 @@
3838
"bugs": {
3939
"url": "https://github.com/mapbox/pixelmatch/issues"
4040
},
41-
"homepage": "https://github.com/mapbox/pixelmatch#readme"
41+
"homepage": "https://github.com/mapbox/pixelmatch#readme",
42+
"publishConfig": {
43+
"access": "public"
44+
}
4245
}

0 commit comments

Comments
 (0)