forked from NodeOS/NodeOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpublish
executable file
·37 lines (29 loc) · 816 Bytes
/
publish
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env node
var resolve = require('path').resolve
var publishRelease = require('publish-release')
const token = process.env.GITHUB_TOKEN
if(!token) throw 'GITHUB_TOKEN environment variable is not defined'
const tag = (new Date()).toISOString().substr(0,10)
var branch_name = process.env.BRANCH_NAME
if(branch_name && branch_name !== 'master') tag += ' ('+branch_name+')'
var opts =
{
token: token,
owner: 'NodeOS',
repo: 'NodeOS',
tag: tag,
prerelease: true,
assets:
[
'out/i386/pc_iso/i386-pc_iso.zip',
'out/i386/pc_qemu/i386-pc_qemu.zip',
'out/i386/vagga/i386-vagga.zip',
'out/x86_64/pc_iso/x86_64-pc_iso.zip',
'out/x86_64/pc_qemu/x86_64-pc_qemu.zip',
'out/x86_64/vagga/x86_64-vagga.zip'
]
}
publishRelease(opts, function(error)
{
if(error) throw error
})