0.0.1 • Published 2 years ago

@octorelease/github v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

GitHub plugin

Octorelease plugin to perform actions related to GitHub.

Build Status npm latest version

StepDescription
initPrompt for semantic release label on associated pull request.
versionPublish a new release to GitHub and upload assets.
successAdd "released" label to associated pull request.
failRemove 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

VariableDescription
GITHUB_TOKENAccess token to perform GitHub operations.

Options

OptionsDescriptionDefault
assetsFile patterns to upload to GitHub release. Can specify one string or an array of strings.[]
checkPrLabelsSpecify 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
githubUrlHostname 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.