mirror of
https://github.com/atom/atom.git
synced 2026-01-14 17:38:03 -05:00
This change adds automation for producing nightly Atom releases using VSTS CI. Most of the changes are just slight modifications to Atom's existing build scripts to produce another build channel and publish those artifacts in a way that can be installed and updated when new releases are available.
31 lines
872 B
JavaScript
31 lines
872 B
JavaScript
'use strict'
|
|
|
|
const publishRelease = require('publish-release')
|
|
const CONFIG = require('../config')
|
|
|
|
module.exports = function (assets) {
|
|
return new Promise(function (resolve, reject) {
|
|
console.log(`Uploading assets to GitHub release ${CONFIG.computedAppVersion}`)
|
|
publishRelease({
|
|
token: process.env.GITHUB_TOKEN,
|
|
owner: 'atom',
|
|
repo: CONFIG.channel !== 'nightly' ? 'atom' : 'atom-nightly-releases',
|
|
name: CONFIG.computedAppVersion,
|
|
tag: CONFIG.computedAppVersion,
|
|
draft: true,
|
|
prerelease: CONFIG.channel !== 'stable',
|
|
reuseRelease: true,
|
|
reuseDraftOnly: true,
|
|
skipIfPublished: true,
|
|
assets
|
|
}, function (err, release) {
|
|
if (err) {
|
|
reject(err)
|
|
} else {
|
|
console.log('Release created successfully: ', release.html_url)
|
|
resolve(release)
|
|
}
|
|
})
|
|
})
|
|
}
|