Skip to content
Permalink
Browse files

feat(publisher): add draft and prerelease options for publishing to g…

…ithub

Add support for two additional options on GitHub's release API, the ability to control whether the
release is a pre-release, and also the ability to publish immediately rather than always use the
draft option (current behavior).
  • Loading branch information
stanlemon authored and malept committed Jan 3, 2017
1 parent e885cd5 commit 898de235805587d035b4d468cd58954f96b818cf
Showing with 3 additions and 2 deletions.
  1. +1 −1 README.md
  2. +2 −1 src/publishers/github.js
@@ -165,7 +165,7 @@ the JS file method mentioned above then you can use functions normally.

| Target Name | Description | Required Config |
|-------------|-------------|-----------------|
| github | Makes a new release for the current version (if required) and uploads the make artifacts as release assets | `process.env.GITHUB_TOKEN` - A personal access token with access to your releases <br />`forge.github_repository.owner` - The owner of the GitHub repository<br />`forge.github_repository.name` - The name of the GitHub repository |
| github | Makes a new release for the current version (if required) and uploads the make artifacts as release assets | `process.env.GITHUB_TOKEN` - A personal access token with access to your releases <br />`forge.github_repository.owner` - The owner of the GitHub repository<br />`forge.github_repository.name` - The name of the GitHub repository <br />`forge.github_repository.draft` - Create the release as a draft, defaults to `true` <br />`forge.github_repository.prerelease` - Identify the release as a prerelease, defaults to `false` |

## Custom `make` and `publish` targets

@@ -31,7 +31,8 @@ export default async (artifacts, packageJSON, forgeConfig, authToken, tag) => {
repo: forgeConfig.github_repository.name,
tag_name: tag || `v${packageJSON.version}`,
name: tag || `v${packageJSON.version}`,
draft: true,
draft: forgeConfig.github_repository.draft !== false,
prerelease: forgeConfig.github_repository.prerelease === true,
});
} else {
// Unknown error

0 comments on commit 898de23

Please sign in to comment.
You can’t perform that action at this time.