|
|
@ -13,17 +13,17 @@ const headers = { |
|
|
|
const version = getVersionFromPackageJson() |
|
|
|
const version = getVersionFromPackageJson() |
|
|
|
let channel = 'latest' |
|
|
|
let channel = 'latest' |
|
|
|
|
|
|
|
|
|
|
|
if(version.includes('beta')) { |
|
|
|
if (version.includes('beta')) { |
|
|
|
channel = 'beta' |
|
|
|
channel = 'beta' |
|
|
|
} |
|
|
|
} |
|
|
|
if(version.includes('alpha')) { |
|
|
|
if (version.includes('alpha')) { |
|
|
|
channel = 'alpha' |
|
|
|
channel = 'alpha' |
|
|
|
} |
|
|
|
} |
|
|
|
if(version.includes('insiders')) { |
|
|
|
if (version.includes('insiders')) { |
|
|
|
channel = 'insiders' |
|
|
|
channel = 'insiders' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(channel !== 'latest') repo = `remix-desktop-${channel}` |
|
|
|
if (channel !== 'latest') repo = `remix-desktop-${channel}` |
|
|
|
|
|
|
|
|
|
|
|
const octokit = new Octokit({ |
|
|
|
const octokit = new Octokit({ |
|
|
|
auth: process.env.GH_TOKEN_DESKTOP_PUBLISH, |
|
|
|
auth: process.env.GH_TOKEN_DESKTOP_PUBLISH, |
|
|
@ -52,7 +52,7 @@ async function uploadReleaseAsset(release, name, file) { |
|
|
|
name, |
|
|
|
name, |
|
|
|
label: name |
|
|
|
label: name |
|
|
|
}); |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
console.log(`File ${file} does not exist. Skipping...`) |
|
|
|
console.log(`File ${file} does not exist. Skipping...`) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -107,7 +107,7 @@ async function hashFile(file): Promise<string> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async function main() { |
|
|
|
async function main() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const allReleases = await getAllReleases() |
|
|
|
const allReleases = await getAllReleases() |
|
|
@ -219,7 +219,9 @@ async function main() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
files = await readReleaseFilesFromLocalDirectory() |
|
|
|
files = await readReleaseFilesFromLocalDirectory() |
|
|
|
files = files.filter((file) => file.endsWith('.zip') || file.endsWith('.dmg') || file.endsWith('.exe') || file.endsWith('.AppImage') || file.endsWith('.snap') || file.endsWith('.deb') || file.startsWith(`latest`)) |
|
|
|
files = files. |
|
|
|
|
|
|
|
filter((file) => file.endsWith('.zip') || file.endsWith('.dmg') || file.endsWith('.exe') || file.endsWith('.AppImage') || file.endsWith('.snap') || file.endsWith('.deb') || file.startsWith(`latest`)) |
|
|
|
|
|
|
|
.filter((file) => !file.startsWith('._')) |
|
|
|
console.log(`Found ${files.length} files to upload`) |
|
|
|
console.log(`Found ${files.length} files to upload`) |
|
|
|
console.log(files) |
|
|
|
console.log(files) |
|
|
|
if (!release.draft) { |
|
|
|
if (!release.draft) { |
|
|
|