node-pre-gyp-github

A node-pre-gyp module which provides the ability to publish to GitHub releases.

MIT 23 个版本
安装
npm install node-pre-gyp-github
yarn add node-pre-gyp-github
pnpm add node-pre-gyp-github
bun add node-pre-gyp-github
README

node-pre-gyp-github

A node-pre-gyp module which provides the ability to publish to GitHub releases.

Coverage Status

Usage

Instead of node-pre-gyp publish use node-pre-gyp-github publish

Options for publish command

  • --silent : Turns verbose messages off.

  • --release : Publish the GitHub Release immediately instead of creating a Draft.

    For Ex. node-pre-gyp-github publish --release

Install

npm install -g node-pre-gyp-github
# or
yarn global add node-pre-gyp-github

Configuration

This module is intended to be used with node-pre-gyp. Therefore, be sure to configure and install node-pre-gyp first. After having done that, within package.json update the binary properties host and remote_path so it matches the following format:

  "host": "https://github.com/[owner]/[repo]/releases/download/",
  "remote_path": "{version}"

Be sure to replace [owner], [repo], with actual values, but DO NOT replace {version} with actual version.

WARNING: Variable substitutions are not supported on the host property and on the remote_path only {version} placeholder is supported. The value of remote_path after substitution will become a release tag name. Do not use forbidden git tag characters for version and remote_path properties.

Within GitHub, create a new authorization:

  1. go to Settings -> Developer settings
  2. click Personal access tokens
  3. click Generate new token
  4. Select public_repo and repo_deployment
  5. Generate Token
  6. copy the key that's generated and set NODE_PRE_GYP_GITHUB_TOKEN environment variable to it. Within your command prompt:
SET NODE_PRE_GYP_GITHUB_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Example (Publish to GitHub as a Draft Release)

  1. node-pre-gyp configure
  2. node-pre-gyp build
  3. node-pre-gyp package
  4. node-pre-gyp-github publish

Example (Publish to GitHub as a Release)

  1. node-pre-gyp configure
  2. node-pre-gyp build
  3. node-pre-gyp package
  4. node-pre-gyp-github publish --release
版本列表
2.0.0 2024-05-13
1.4.6 2024-05-13
1.4.5 2024-05-13
1.4.4 2022-04-13
1.4.3 2018-12-01
1.4.2 2018-09-22
1.4.1 2018-08-04
1.4.0 2018-08-04
1.3.1 2016-06-03
1.3.0 2016-06-02
1.2.2 2016-06-01
1.2.1 2016-05-26
1.2.0 2016-05-24
1.1.2 2015-12-24
1.1.1 2015-12-23
1.1.0 2015-12-22
1.0.6 2015-11-10
1.0.5 2015-10-27
1.0.4 2015-10-20
1.0.3 2015-10-20
1.0.2 2015-10-20
1.0.1 2015-10-20
1.0.0 2015-10-16