Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 855 Bytes

README.md

File metadata and controls

47 lines (35 loc) · 855 Bytes

gulp-octorelease

Publish releases & upload assets with gulp

Installation

npm i --save-dev gulp-octorelease

Usage

Import it:

import release from 'gulp-octorelease';

Or if you are using CommonJS modules, require it like this:

const release = require('gulp-octorelease').default;

EX:

const manifest = require('package.json');

gulp.task('github', function(){
	gulp.src(pathToZipFile)
	.pipe(release({
		token: process.env.GITHUB_TOKEN,
		tag: 'v' + manifest.version,
		name: manifest.name + ' v' + manifest.version,
		body: 'New ' + manifest.name + ' release v' + manifest.version + '!',
		assetName: 'yourAssetName.zip',
		manifest: manifest
	}));
});

gulp.task('release', ['your-zip-task', 'github']);

TODO

  • Better error handling
  • Consider using async/await

Cheers 🤖