diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a869529..33bd3b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,4 +29,8 @@ jobs: misc-test-builds: ${{ matrix.misc-test-builds }} - name: Try bun - run: bun --version \ No newline at end of file + run: bun --version + + - name: Show status + if: always() + run: echo $status \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 2c4311a..0754a23 100644 --- a/dist/index.js +++ b/dist/index.js @@ -21,7 +21,7 @@ const main = async () => { if ((release === null || release === void 0 ? void 0 : release.message) === 'Not Found') return exit('Invalid bun version.', miscTestBuilds); info(`Going to install release ${release.version}`); - await install(release, miscTestBuilds); + await install(release); setOutput('bun-version', release.tag_name); } catch (e) { diff --git a/dist/utils/getAsset.js b/dist/utils/getAsset.js index e466142..cf201f6 100644 --- a/dist/utils/getAsset.js +++ b/dist/utils/getAsset.js @@ -1,5 +1,5 @@ import { exit } from '../index.js'; -export default (assets, miscTestBuilds) => { +export default (assets) => { let arch; switch (process.arch) { case 'arm64': @@ -15,10 +15,8 @@ export default (assets, miscTestBuilds) => { throw new Error(`Unsupported platform ${process.platform}.`); const assetName = `bun-${process.platform}-${arch}.zip`; const asset = assets.find(asset => asset.name === assetName); - if (!asset) { - exit(`Invalid asset ${assetName}`, miscTestBuilds); - process.exit(); - } + if (!asset) + exit(`Invalid asset ${assetName}`); return { name: `bun-${process.platform}-${arch}`, asset: assets.find(asset => asset.name === `bun-${process.platform}-${arch}.zip`), diff --git a/dist/utils/install.js b/dist/utils/install.js index 6ae7675..101f775 100644 --- a/dist/utils/install.js +++ b/dist/utils/install.js @@ -4,8 +4,8 @@ import { addPath, info } from '@actions/core'; import getAsset from './getAsset.js'; import { join } from 'path'; import { homedir } from 'os'; -export default async (release, miscTestBuilds) => { - const asset = getAsset(release.assets, miscTestBuilds); +export default async (release) => { + const asset = getAsset(release.assets); const path = join(homedir(), '.bun', 'bin', asset.name); const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}-${release.version}`); if (cache) { diff --git a/src/index.ts b/src/index.ts index ebe9e6f..1fbc1ef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,7 +24,7 @@ const main = async() => { info(`Going to install release ${release.version}`); - await install(release, miscTestBuilds); + await install(release); setOutput('bun-version', release.tag_name); } catch(e) { diff --git a/src/utils/getAsset.ts b/src/utils/getAsset.ts index 52654a3..a158daa 100644 --- a/src/utils/getAsset.ts +++ b/src/utils/getAsset.ts @@ -1,7 +1,7 @@ import { exit } from '../index.js'; import { Asset } from './getGithubRelease.js'; -export default (assets: Asset[], miscTestBuilds: boolean) => { +export default (assets: Asset[]) => { let arch; switch (process.arch) { case 'arm64': @@ -20,10 +20,7 @@ export default (assets: Asset[], miscTestBuilds: boolean) => { const assetName = `bun-${process.platform}-${arch}.zip`; const asset = assets.find(asset => asset.name === assetName); - if (!asset) { - exit(`Invalid asset ${assetName}`, miscTestBuilds); - process.exit(); - } + if (!asset) exit(`Invalid asset ${assetName}`); return { name: `bun-${process.platform}-${arch}`, diff --git a/src/utils/install.ts b/src/utils/install.ts index 09f83dc..54f29ab 100644 --- a/src/utils/install.ts +++ b/src/utils/install.ts @@ -6,8 +6,8 @@ import getAsset from './getAsset.js'; import { join } from 'path'; import { homedir } from 'os'; -export default async(release: Release, miscTestBuilds: boolean) => { - const asset = getAsset(release.assets, miscTestBuilds); +export default async(release: Release) => { + const asset = getAsset(release.assets); const path = join(homedir(), '.bun', 'bin', asset.name); const cache = find('bun', release.version) || await restoreCache([path], `bun-${process.platform}-${asset.name}-${release.version}`); if (cache) {