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
17 changes: 17 additions & 0 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish
on:
push:
tags: ['v*']
permissions:
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
environment: npm-release
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
- run: npm ci
- run: npm publish --access public
24 changes: 13 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,23 @@ Follow this deploy process after all changes for the release are merged into mai
## Release checklist
1. Create a branch off `main` and a pull request with the following changes. Copy this checklist in the comment of the pull request.
- [ ] Update the [CHANGELOG.md](https://github.com/mapbox/mapbox-gl-geocoder/blob/main/CHANGELOG.md) by comparing the last release and what is on `main`. In the changelog, replace the `HEAD` heading with the to-be-released stable version.
- [ ] Update the [CHANGELOG.md](https://github.com/mapbox/mapbox-gl-geocoder/blob/main/CHANGELOG.md) by comparing the last release and what is on `main`. In the changelog, add the to-be-released stable version heading below `HEAD`.
- [ ] Update the version number in `package.json` and `package-lock.json`.
3. Request a PR review and then merge it into `main`.
4. Tag the release and start the build.
- [ ] Make sure you've pulled in all changes to `main` locally.
- [ ] Build the release with `npm run prepublish && npm run docs`
- [ ] Commit and push with commit message `vX.X.X`
- [ ] Create the git tag for the release with `git tag -a vX.X.X -m 'vX.X.X'`
- [ ] Push the tags with `git push --tags`
- [ ] Run `mbx npm publish`
- [ ] Run `npm run docs` and commit any changes to `API.md`.
2. Request a PR review and then merge it into `main`.
3. Tag the merge commit and publish.
- [ ] Create the git tag with `git tag -a vX.X.X -m 'vX.X.X'` on the merged commit
- [ ] Push it with `git push origin vX.X.X`. This starts the `Publish` workflow, which publishes to npm once the `npm-release` environment is approved.
- [ ] Create a GitHub release for the tag with the changelog entry.
## Post-release checklist
Update version number in GL JS examples at [https://github.com/mapbox/mapbox-gl-js-docs](https://github.com/mapbox/mapbox-gl-js-docs):
Upload to the CDN (make sure you are authenticated for AWS):
sed -i '' 's/mapbox-gl-geocoder\/v[^\/]*\//mapbox-gl-geocoder\/vX.X.X\//g' docs/pages/example/*.html
git checkout vX.X.X
npm ci
aws s3 cp --recursive --acl public-read dist s3://mapbox-gl-js/plugins/mapbox-gl-geocoder/vX.X.X
Update the geocoder version in `src/components/example/helpers.js` of [mapbox-gl-js-docs](https://github.com/mapbox/mapbox-gl-js-docs).
```
Loading