mirror of
https://github.com/lights0123/n-link.git
synced 2025-01-03 15:15:26 +00:00
Use template strings...
This commit is contained in:
parent
f484380aa4
commit
9579f98a6a
20
.github/workflows/release.yml
vendored
20
.github/workflows/release.yml
vendored
|
@ -84,13 +84,6 @@ jobs:
|
||||||
- name: install app dependencies
|
- name: install app dependencies
|
||||||
run: yarn
|
run: yarn
|
||||||
- uses: tauri-apps/tauri-action@v0
|
- uses: tauri-apps/tauri-action@v0
|
||||||
if: runner.os == 'Linux'
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
npmScript: "tauri:build"
|
|
||||||
- uses: tauri-apps/tauri-action@v0
|
|
||||||
if: runner.os != 'Linux'
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
@ -108,20 +101,9 @@ jobs:
|
||||||
|
|
||||||
const {repo: {owner, repo}, sha} = context;
|
const {repo: {owner, repo}, sha} = context;
|
||||||
console.log({owner, repo, sha});
|
console.log({owner, repo, sha});
|
||||||
const {name, version} = require('${process.env.GITHUB_WORKSPACE}/package.json');
|
const {name, version} = require(`${process.env.GITHUB_WORKSPACE}/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('${process.env.GITHUB_WORKSPACE}/src-tauri/target/release/bundle/deb', {withFileTypes: true})).filter(dir => dir.isFile()).map(({name}) => name)) {
|
|
||||||
console.log('uploading', file);
|
|
||||||
|
|
||||||
await github.repos.uploadReleaseAsset({
|
|
||||||
owner, repo,
|
|
||||||
release_id: "${{ needs.create-release.outputs.RELEASE_UPLOAD_ID }}",
|
|
||||||
name: file,
|
|
||||||
data: await fs.readFile(`${process.env.GITHUB_WORKSPACE}/${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 }}",
|
||||||
|
|
Loading…
Reference in a new issue