diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c44483..95c27a2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,6 +50,4 @@ jobs: - name: Add tag env: MATRIX_LANG: ${{ matrix.lang }} - run: | - cd src-tauri/target/release/bundle - deno run -A script/tag.ts + run: deno run -A script/tag.ts diff --git a/script/tag.ts b/script/tag.ts index 58fa77b..486b0bd 100644 --- a/script/tag.ts +++ b/script/tag.ts @@ -1,15 +1,16 @@ const dirs = ["msi", "nsis", "deb", "appimage", "dmg", "macos",] const lang = Deno.env.get("MATRIX_LANG") +const root = "../src-tauri/target/release/bundle" for (const dir of dirs) { - if (Deno.statSync(`./${dir}`).isDirectory) { + if (Deno.statSync(`${root}/${dir}`).isDirectory) { for await (const file of Deno.readDir(dir)) { if (file.isFile && file.name.startsWith("tran")) { let name = file.name name = name.replace("tran", "tran" + "_" + lang) - Deno.renameSync(`./${dir}/${file.name}`, `./${dir}/${name}`) - console.log(`./${dir}/${name}`) + Deno.renameSync(`${root}/${file.name}`, `${root}/${name}`) + console.log(`${root}/${name}`) } } }