Skip to content

Commit 9f2d7b7

Browse files
oielbannaclaude
andcommitted
Add automated NPM release workflow via CodeArtifact
Adds publish-npm.yml using the shared mapbox/gha CodeArtifact releaser and adds a build script stub to package.json. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1ef4967 commit 9f2d7b7

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/publish-npm.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: NPM release
2+
3+
on:
4+
pull_request:
5+
branches: [ master ]
6+
types:
7+
- opened
8+
- synchronize
9+
- reopened
10+
# Triggers the workflow when labels change in the PR
11+
- labeled
12+
- unlabeled
13+
push:
14+
branches:
15+
- master
16+
17+
jobs:
18+
npm-release:
19+
uses: mapbox/gha/.github/workflows/workflow-release-npm-package-codeartifact.yml@workflow-release-npm-package-codeartifact-v1
20+
secrets: inherit
21+
with:
22+
test: false

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,12 @@ a DynamoDB table.
7676
## Documentation
7777

7878
See API.md for documentation of the JavaScript client, and use `dyno --help` for details on CLI usage.
79+
80+
## Releasing
81+
82+
The `@mapbox/dyno` NPM package is released automatically via GitHub Actions using a label-based workflow.
83+
84+
To release a new version:
85+
1. Open a pull request with your changes.
86+
2. Add a label (`patch`, `minor`, `major`, `prerelease`, or `no-release`) to control the version bump.
87+
3. Once the PR is merged to `master`, the `NPM release` workflow will automatically bump the version, update the CHANGELOG, publish to CodeArtifact, and create a GitHub Release.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"node": ">=16"
88
},
99
"scripts": {
10+
"build": "echo 'No build step required'",
1011
"pretest": "eslint bin lib test index.js",
1112
"test": "nyc tape test/*.test.js",
1213
"docs": "documentation build index.js -f md > API.md",

0 commit comments

Comments
 (0)