Browse Source

Release script and CI fixes

master
Ivan Bravo Bravo 3 years ago
parent
commit
a653fc47dd
  1. 4
      .github/workflows/ci.yml
  2. 11
      scripts/release.js

4
.github/workflows/ci.yml

@ -90,6 +90,10 @@ jobs: @@ -90,6 +90,10 @@ jobs:
with:
node-version: 12.x
- name: Use 7z
if: matrix.os-short == 'macos'
run: brew install p7zip
- name: Use Yarn
run: npm install -g yarn

11
scripts/release.js

@ -54,12 +54,14 @@ const fileName = `DreamPower-${version}-${getOS()}-${ @@ -54,12 +54,14 @@ const fileName = `DreamPower-${version}-${getOS()}-${
const buildPath = path.resolve(__dirname, '../dist/dreampower')
const filePath = path.resolve(__dirname, '../', fileName)
/*
console.log({
tagName,
fileName,
buildPath,
filePath
})
*/
async function getGithubReleaseUrl() {
let response
@ -75,15 +77,16 @@ async function getGithubReleaseUrl() { @@ -75,15 +77,16 @@ async function getGithubReleaseUrl() {
throw err
}
console.log(`Creating release for tag: ${tagName}...`)
try {
response = await octokit.repos.createRelease({
owner: 'private-dreamnet',
repo: 'dreampower',
tag_name: tagName,
target_commitish: process.env.GITHUB_SHA,
name: version,
prerelease: true,
draft: true
draft: false
})
} catch (err) {
console.log(err)
@ -181,4 +184,8 @@ async function main() { @@ -181,4 +184,8 @@ async function main() {
}
}
process.on('unhandledRejection', (err) => {
throw err
})
main()

Loading…
Cancel
Save