Giter Club home page Giter Club logo

node-pre-gyp-github's Introduction

node-pre-gyp-github

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

Coverage Status Join the chat at https://gitter.im/bchr02/node-pre-gyp-github

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

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
  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

node-pre-gyp-github's People

Contributors

bchr02 avatar royaltm avatar jacobrosenthal avatar nawaid95 avatar keleko34 avatar gitter-badger avatar neophob avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.