diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cce5fd2..ab72dbc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,7 @@ jobs: ocaml-version: ${{ matrix.ocaml-version }} - name: Use Node.js 12.x + if: ${{ matrix.os == 'ubuntu-latest' }} uses: actions/setup-node@v1 with: node-version: 12.x @@ -35,7 +36,7 @@ jobs: run: opam depext -yt spin - name: Install dependencies - run: make dev + run: opam install --deps-only -y . - name: Substitute watermarks run: opam exec -- dune subst @@ -58,7 +59,7 @@ jobs: uses: actions/upload-artifact@master with: name: ${{ matrix.os }} - path: _build/install/default/bin/spin + path: _build/default/bin/main.exe publish: needs: build diff --git a/script/release-postinstall.js b/script/release-postinstall.js index 8a29c06..d010210 100644 --- a/script/release-postinstall.js +++ b/script/release-postinstall.js @@ -6,9 +6,7 @@ const fs = require("fs"); const platform = process.platform; -const binariesToCopy = [ - "spin" -]; +const binaryName = "main.exe"; function find_arch() { // The running binary is 64-bit, so the OS is clearly 64-bit. @@ -57,18 +55,16 @@ function copyFileSync(sourcePath, destPath) { fs.chmodSync(destPath, stat.mode); } -const copyPlatformBinaries = platformPath => { +const copyPlatformBinary = platformPath => { const platformBuildPath = path.join(__dirname, platformPath); - binariesToCopy.forEach(binaryPath => { - const sourcePath = path.join(platformBuildPath, binaryPath); - const destPath = path.join(__dirname, binaryPath); - if (fs.existsSync(destPath)) { - fs.unlinkSync(destPath); - } - copyFileSync(sourcePath, destPath); - fs.chmodSync(destPath, 0o755); - }); + const sourcePath = path.join(platformBuildPath, binaryName); + const destPath = path.join(__dirname, "spin"); + if (fs.existsSync(destPath)) { + fs.unlinkSync(destPath); + } + copyFileSync(sourcePath, destPath); + fs.chmodSync(destPath, 0o755); }; const arch = find_arch(); @@ -86,4 +82,4 @@ if (!supported) { process.exit(1); } -copyPlatformBinaries(platformPath); +copyPlatformBinary(platformPath);