Fix owner and repo in release code

This commit is contained in:
Gregory Schier 2019-10-10 10:29:49 -07:00
parent 54a524a55c
commit 2153af7ab9
2 changed files with 11 additions and 8 deletions

View File

@ -58,7 +58,7 @@ jobs:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
Ubuntu14:
name: Ubuntu
name: Ubuntu 14 (Snap)
runs-on: ubuntu-16.04
steps:
- name: Checkout branch
@ -69,7 +69,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF: ${{ github.event.ref }}
Ubuntu16:
name: Ubuntu
name: Ubuntu 14
runs-on: ubuntu-16.04
steps:
- name: Checkout branch

View File

@ -11,6 +11,9 @@ const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN,
});
const OWNER = 'getinsomnia';
const REPO = 'insomnia';
// Start package if ran from CLI
if (require.main === module) {
if (!process.env.GITHUB_REF.match(/v\d{1,3}\.\d{1,3}\.\d{1,3}$/)) {
@ -58,8 +61,8 @@ async function start() {
url: 'https://uploads.github.com/repos/:owner/:repo/releases/:id/assets{?name,label}"',
id: data.id,
name: name,
owner: 'kong',
repo: 'studio',
owner: OWNER,
repo: REPO,
headers: {
'Content-Type': 'application/octet-stream',
},
@ -73,8 +76,8 @@ async function start() {
async function getOrCreateRelease(tagName) {
try {
return await octokit.repos.getReleaseByTag({
owner: 'kong',
repo: 'studio',
owner: OWNER,
repo: REPO,
tag: tagName,
});
} catch (err) {
@ -82,8 +85,8 @@ async function getOrCreateRelease(tagName) {
}
return octokit.repos.createRelease({
owner: 'kong',
repo: 'studio',
owner: OWNER,
repo: REPO,
tag_name: tagName,
name: tagName,
body: `${packageJson.app.productName} ${tagName}`,