mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Fix owner and repo in release code
This commit is contained in:
parent
54a524a55c
commit
2153af7ab9
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@ -58,7 +58,7 @@ jobs:
|
|||||||
APPLE_ID: ${{ secrets.APPLE_ID }}
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
|
||||||
Ubuntu14:
|
Ubuntu14:
|
||||||
name: Ubuntu
|
name: Ubuntu 14 (Snap)
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ubuntu-16.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
@ -69,7 +69,7 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GITHUB_REF: ${{ github.event.ref }}
|
GITHUB_REF: ${{ github.event.ref }}
|
||||||
Ubuntu16:
|
Ubuntu16:
|
||||||
name: Ubuntu
|
name: Ubuntu 14
|
||||||
runs-on: ubuntu-16.04
|
runs-on: ubuntu-16.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
|
@ -11,6 +11,9 @@ const octokit = new Octokit({
|
|||||||
auth: process.env.GITHUB_TOKEN,
|
auth: process.env.GITHUB_TOKEN,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const OWNER = 'getinsomnia';
|
||||||
|
const REPO = 'insomnia';
|
||||||
|
|
||||||
// Start package if ran from CLI
|
// Start package if ran from CLI
|
||||||
if (require.main === module) {
|
if (require.main === module) {
|
||||||
if (!process.env.GITHUB_REF.match(/v\d{1,3}\.\d{1,3}\.\d{1,3}$/)) {
|
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}"',
|
url: 'https://uploads.github.com/repos/:owner/:repo/releases/:id/assets{?name,label}"',
|
||||||
id: data.id,
|
id: data.id,
|
||||||
name: name,
|
name: name,
|
||||||
owner: 'kong',
|
owner: OWNER,
|
||||||
repo: 'studio',
|
repo: REPO,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/octet-stream',
|
'Content-Type': 'application/octet-stream',
|
||||||
},
|
},
|
||||||
@ -73,8 +76,8 @@ async function start() {
|
|||||||
async function getOrCreateRelease(tagName) {
|
async function getOrCreateRelease(tagName) {
|
||||||
try {
|
try {
|
||||||
return await octokit.repos.getReleaseByTag({
|
return await octokit.repos.getReleaseByTag({
|
||||||
owner: 'kong',
|
owner: OWNER,
|
||||||
repo: 'studio',
|
repo: REPO,
|
||||||
tag: tagName,
|
tag: tagName,
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
@ -82,8 +85,8 @@ async function getOrCreateRelease(tagName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return octokit.repos.createRelease({
|
return octokit.repos.createRelease({
|
||||||
owner: 'kong',
|
owner: OWNER,
|
||||||
repo: 'studio',
|
repo: REPO,
|
||||||
tag_name: tagName,
|
tag_name: tagName,
|
||||||
name: tagName,
|
name: tagName,
|
||||||
body: `${packageJson.app.productName} ${tagName}`,
|
body: `${packageJson.app.productName} ${tagName}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user