From 1ddcbd6685628238de0aa408de6f3039eed00852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aykut=20Karda=C5=9F?= Date: Wed, 21 Feb 2024 20:25:50 +0300 Subject: [PATCH 1/3] chore: add setup-bun action to workflows --- .github/workflows/release.yml | 12 +++++++----- .github/workflows/tests.yaml | 14 ++++++++------ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d76d7f0..fc8c2d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,19 +21,21 @@ jobs: with: node-version: lts/* - - name: Install bun - run: curl -fsSL https://bun.sh/install | bash + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest - name: Set package version run: | ~/.bun/bin/bun ./scripts/set-version.js . ${{ env.VERSION }} echo "export const VERSION='${{ env.VERSION }}'" > ./src/version.ts - - name: Install - run: ~/.bun/bin/bun install + - name: Install dependencies + run: bun install - name: Build package - run: ~/.bun/bin/bun run build + run: bun build - name: Authenticate Registry run: npm set "//registry.npmjs.org/:_authToken" ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 30e05d7..7ec2846 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -20,15 +20,17 @@ jobs: - name: Setup repo uses: actions/checkout@v3 - - name: Install bun - run: curl -fsSL https://bun.sh/install | bash + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + - name: Install dependencies - run: ~/.bun/bin/bun install + run: bun install - name: Run tests - run: ~/.bun/bin/bun test --coverage + run: bun test --coverage - name: Build - run: ~/.bun/bin/bun run build - + run: bun run build \ No newline at end of file From 128d8e6539b2196c6484b0a4235818a6680f33e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aykut=20Karda=C5=9F?= Date: Wed, 21 Feb 2024 20:26:52 +0300 Subject: [PATCH 2/3] fix: remove unnecessary space --- .github/workflows/tests.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7ec2846..9408e46 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -33,4 +33,3 @@ jobs: - name: Build run: bun run build - \ No newline at end of file From cde72e47dad0a094ea30d8a18e9eae3bfce3e4ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aykut=20Karda=C5=9F?= Date: Wed, 21 Feb 2024 20:27:59 +0300 Subject: [PATCH 3/3] fix: bun build syntax --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc8c2d7..ff37cc8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: run: bun install - name: Build package - run: bun build + run: bun run build - name: Authenticate Registry run: npm set "//registry.npmjs.org/:_authToken" ${{ secrets.NPM_TOKEN }}