mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-20 07:41:22 +02:00
Fix Node arch
This commit is contained in:
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -18,12 +18,16 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- platform: 'macos-latest' # for Arm-based macs (M1 and above).
|
- platform: 'macos-latest' # for Arm-based macs (M1 and above).
|
||||||
args: '--target aarch64-apple-darwin'
|
args: '--target aarch64-apple-darwin'
|
||||||
|
node_arch: 'x64'
|
||||||
- platform: 'macos-latest' # for Intel-based macs.
|
- platform: 'macos-latest' # for Intel-based macs.
|
||||||
args: '--target x86_64-apple-darwin'
|
args: '--target x86_64-apple-darwin'
|
||||||
|
node_arch: 'arm64'
|
||||||
- platform: 'ubuntu-22.04' # for Tauri v1, you could replace this with ubuntu-20.04.
|
- platform: 'ubuntu-22.04' # for Tauri v1, you could replace this with ubuntu-20.04.
|
||||||
args: ''
|
args: ''
|
||||||
|
node_arch: 'x64'
|
||||||
- platform: 'windows-latest'
|
- platform: 'windows-latest'
|
||||||
args: ''
|
args: ''
|
||||||
|
node_arch: 'x64'
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout yaakapp/app
|
- name: Checkout yaakapp/app
|
||||||
@@ -95,6 +99,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: tauri-apps/tauri-action@v0
|
- uses: tauri-apps/tauri-action@v0
|
||||||
env:
|
env:
|
||||||
|
NODE_ARCH: ${{ matrix.node_arch }}
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ try {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const dstPath = path.join(destDir, DST_BIN_MAP[`${process.platform}_${process.arch}`]);
|
const key = `${process.platform}_${process.env.NODE_ARCH ?? process.arch}`;
|
||||||
|
const dstPath = path.join(destDir, DST_BIN_MAP[key]);
|
||||||
cpSync(tmpNodePath, dstPath);
|
cpSync(tmpNodePath, dstPath);
|
||||||
|
|
||||||
console.log(`Copied sea to ${dstPath}`)
|
console.log(`Copied sea to ${dstPath}`)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const SRC_BIN_MAP = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
(async function () {
|
(async function () {
|
||||||
const key = `${process.platform}_${process.arch}`;
|
const key = `${process.platform}_${process.env.NODE_ARCH ?? process.arch}`;
|
||||||
const url = URL_MAP[key];
|
const url = URL_MAP[key];
|
||||||
const tmpDir = path.join(os.tmpdir(), `${Math.random()}`);
|
const tmpDir = path.join(os.tmpdir(), `${Math.random()}`);
|
||||||
const dstDir = path.join(__dirname, `..`, 'src-tauri', 'vendored', 'protoc');
|
const dstDir = path.join(__dirname, `..`, 'src-tauri', 'vendored', 'protoc');
|
||||||
|
|||||||
Reference in New Issue
Block a user