diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f7798b5..433112c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,5 +33,5 @@ jobs: - uses: ncipollo/release-action@v1 with: - artifacts: "*.asar" + artifacts: "bundle/*" makeLatest: true diff --git a/.gitignore b/.gitignore index 76c8669..e6b27c2 100644 --- a/.gitignore +++ b/.gitignore @@ -103,4 +103,4 @@ dist # TernJS port file .tern-port -/*.asar +/bundle diff --git a/manifest.json b/manifest.json index d9b5d19..1bc8073 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "discordID": "489484338514100234", "github": "asportnoy" }, - "version": "1.0.2", + "version": "1.0.3", "updater": { "type": "github", "id": "asportnoy/no-nitro-upsell" diff --git a/scripts/bundle.ts b/scripts/bundle.ts index ab7113b..ff0c1a4 100644 --- a/scripts/bundle.ts +++ b/scripts/bundle.ts @@ -1,8 +1,12 @@ import asar from "@electron/asar"; -import { readFileSync } from "fs"; +import { copyFileSync, existsSync, mkdirSync, readFileSync } from "fs"; import { PluginManifest } from "replugged/dist/types/addon"; -const manifest = JSON.parse(readFileSync("manifest.json", "utf-8")) as PluginManifest; -const outputName = `${manifest.id}.asar`; +const manifest = JSON.parse(readFileSync("dist/manifest.json", "utf-8")) as PluginManifest; +const outputName = `bundle/${manifest.id}`; -asar.createPackage("dist", outputName); +if (!existsSync("bundle")) { + mkdirSync("bundle"); +} +asar.createPackage("dist", `${outputName}.asar`); +copyFileSync("dist/manifest.json", `${outputName}.json`);