FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

CLOUDPLAT-3162: add npm OIDC publish workflow (node-cpp-skel) by haseebehsan · Pull Request #173 · mapbox/node-cpp-skel · GitHub

/ node-cpp-skel Public template
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .json  (1) .md  (1) .yml  (1) All 3 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
15 changes: 15 additions & 0 deletions .github/workflows/npm-release.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: NPM release

on:
workflow_dispatch:

jobs:
npm-release:
uses: mapbox/gha-public/.github/workflows/workflow-npm-oidc-publish.yml@main
permissions:
id-token: write
contents: write
with:
create-github-release: true
environment: npm-release
run-tests: false
18 changes: 17 additions & 1 deletion CONTRIBUTING.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,20 @@ We also use [`clang-tidy`](https://clang.llvm.org/extra/clang-tidy/) as a C++ li

make tidy

These commands are set from within [the Makefile](./Makefile).
These commands are set from within [the Makefile](./Makefile).

## Releasing a new version

Releases are published to npm via GitHub Actions.

### Steps

1. **Bump the version** in `package.json` (follow [semver](https://semver.org))
2. **Update `CHANGELOG.md`** with a summary of what changed
3. **Open a PR**, get it reviewed and merged to `main`
4. **Trigger the release** from the [Actions tab](../../actions/workflows/npm-release.yml):
- Select **NPM release** → **Run workflow** → run from `main`

The workflow will publish to npm and create a GitHub release with auto-generated notes.

> **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.
5 changes: 4 additions & 1 deletion package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mapbox/node-cpp-skel",
"version": "0.2.0",
"version": "0.2.1",
"description": "Skeleton for bindings to C++ libraries for Node.js using N-API (node-addon-api)",
"url": "http://github.com/mapbox/node-cpp-skel",
"main": "./lib/index.js",
Expand Down Expand Up @@ -33,5 +33,8 @@
"host": "https://mapbox-node-binary.s3.amazonaws.com",
"remote_path": "./{name}/v{version}/{configuration}/{toolset}/",
"package_name": "{platform}-{arch}.tar.gz"
},
"publishConfig": {
"access": "public"
}
}
Loading

Back | FazBrowse Home | New Git URL