Fix releasing

This commit is contained in:
lights0123 2020-09-27 17:28:21 -04:00
parent ddbd69f85d
commit 1feb5997cd
No known key found for this signature in database
GPG key ID: 28F315322E37972F

View file

@ -111,14 +111,14 @@ jobs:
const {name, version} = require('./package.json'); const {name, version} = require('./package.json');
const arch = process.arch === 'x64' ? 'amd64' : process.arch; const arch = process.arch === 'x64' ? 'amd64' : process.arch;
for (let file of (await fs.readdir('src-tauri/target/release/bundle/deb', {withFileTypes: true})).filter(dir => dir.isFile()).map(({name}) => name)) { for (let file of (await fs.readdir('${process.env.GITHUB_WORKSPACE}/src-tauri/target/release/bundle/deb', {withFileTypes: true})).filter(dir => dir.isFile()).map(({name}) => name)) {
console.log('uploading', file); console.log('uploading', file);
await github.repos.uploadReleaseAsset({ await github.repos.uploadReleaseAsset({
owner, repo, owner, repo,
release_id: "${{ needs.create-release.outputs.RELEASE_UPLOAD_ID }}", release_id: "${{ needs.create-release.outputs.RELEASE_UPLOAD_ID }}",
name: file, name: file,
data: await fs.readFile(`./${file}`) data: await fs.readFile(`${process.env.GITHUB_WORKSPACE}/${file}`)
}); });
} }
@ -126,5 +126,5 @@ jobs:
owner, repo, owner, repo,
release_id: "${{ needs.create-release.outputs.RELEASE_UPLOAD_ID }}", release_id: "${{ needs.create-release.outputs.RELEASE_UPLOAD_ID }}",
name: `${name}_${version}_${arch}.AppImage`, name: `${name}_${version}_${arch}.AppImage`,
data: await fs.readFile(`src-tauri/target/release/bundle/appimage/n-link.AppImage`) data: await fs.readFile(`${process.env.GITHUB_WORKSPACE}/src-tauri/target/release/bundle/appimage/n-link.AppImage`)
}); });