This commit is contained in:
smartfrigde 2022-05-23 19:43:00 +02:00
parent 7ca079025f
commit eb94a4c4c9

View file

@ -158,34 +158,45 @@ jobs:
// do whatever filtering you want here, I'm just uploading all the files
console.log('uploading', file);
if (fs.lstatSync(`./linux/${file}`).isDirectory()) {
console.log("directory, skipping")
} else {
await github.repos.uploadReleaseAsset({
owner, repo,
release_id: release.data.id,
name: file,
data: await fs.readFile(`./linux/${file}`)
});
}
}
for (let file of await fs.readdir('windows')) {
// do whatever filtering you want here, I'm just uploading all the files
console.log('uploading', file);
if (fs.lstatSync(`./windows/${file}`).isDirectory()) {
console.log("directory, skipping")
} else {
await github.repos.uploadReleaseAsset({
owner, repo,
release_id: release.data.id,
name: file,
data: await fs.readFile(`./windows/${file}`)
});
}
}
for (let file of await fs.readdir('macos')) {
// do whatever filtering you want here, I'm just uploading all the files
console.log('uploading', file);
if (fs.lstatSync(`./macos/${file}`).isDirectory()) {
console.log("directory, skipping")
} else {
await github.repos.uploadReleaseAsset({
owner, repo,
release_id: release.data.id,
name: file,
data: await fs.readFile(`./macos/${file}`)
});
}
}
env:
releaseTag: ${{ steps.vars.outputs.releaseTag }}