@octorelease/github
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

GitHub plugin

Octorelease plugin to perform actions related to GitHub.

Build Status npm latest version

Step Description
init Prompt for semantic release label on associated pull request.
version Publish a new release to GitHub and upload assets.
success Add "released" label to associated pull request.
fail Remove semantic release label on associated pull request.

Install

$ npm install @octorelease/github -D

Usage

The plugin can be configured in the Octorelease configuration file:

{
  "plugins": [
    "@octorelease/github"
  ]
}

Configuration

Environment variables

Variable Description
GITHUB_TOKEN Access token to perform GitHub operations.

Options

Options Description Default
assets File patterns to upload to GitHub release. Can specify one string or an array of strings. []
checkPrLabels Specify true to check pull request labels for a semver bump level. Can specify true to use default labels, or an array of custom label names (see example below). false
githubUrl Hostname of private GitHub instance. https://github.com

Examples

To publish any TGZ archive created in the project root directory:

{
  "plugins": [
    ["@octorelease/github", {
      "assets": "*.tgz"
    }]
  ]
}

To check pull request labels for a semver bump level:

{
  "plugins": [
    ["@octorelease/github", {
      "checkPrLabels": ["release-none", "release-patch", "release-minor", "release-major"]
    }]
  ]
}

The pull request label must be added by a repo admin after the pull request is merged. If you forget to add the label, a reminder comment will be posted on the pull request and you will have 30 minutes to add a label before the build times out.

Readme

Keywords

none

Package Sidebar

Install

npm i @octorelease/github

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

28 kB

Total Files

17

Last publish

Collaborators

  • zowe-actions-robot
  • t1m0thyj