Skip to content

Commit

Permalink
ci: use bun in gh workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
danbillson committed Oct 16, 2024
1 parent 9673dab commit d818966
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 35 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,24 @@ jobs:
- name: Check out git repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
- name: Set up Bun
uses: oven-sh/setup-bun@v2

- name: Cache Bun dependencies
uses: actions/cache@v3
with:
node-version: lts/*
cache: "yarn"
path: |
~/.bun
bun.lockb
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install yarn dependencies
run: yarn install
- name: Install dependencies
run: bun install

- name: Build
run: yarn build
run: bun run build

- name: Test
run: yarn test
run: bun run test
23 changes: 15 additions & 8 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,23 @@ jobs:
- name: Check out git repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
- name: Set up Bun
uses: oven-sh/setup-bun@v2

- name: Cache Bun dependencies
uses: actions/cache@v3
with:
node-version: lts/*
cache: "yarn"
path: |
~/.bun
bun.lockb
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install yarn dependencies
run: yarn install
- name: Install dependencies
run: bun install

- name: Lint
run: |
yarn lint
yarn prettier
bun run lint
bun run prettier
26 changes: 17 additions & 9 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,31 @@ jobs:
- name: Check out git repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
node-version: lts/*
cache: "yarn"
registry-url: 'https://registry.npmjs.org'

- name: Install yarn dependencies
run: yarn install
- name: Cache Bun dependencies
uses: actions/cache@v3
with:
path: |
~/.bun
bun.lockb
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install

- name: Build
run: yarn build
run: bun run build

- name: Test
run: yarn test
run: bun run test

- name: Publish
run: yarn publish:beta
run: bun run publish:beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28 changes: 18 additions & 10 deletions .github/workflows/publish-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,31 @@ jobs:
- name: Check out git repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
node-version: lts/*
cache: "yarn"
registry-url: 'https://registry.npmjs.org'

- name: Install yarn dependencies
run: yarn install
- name: Cache Bun dependencies
uses: actions/cache@v3
with:
path: |
~/.bun
bun.lockb
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
run: bun install

- name: Build
run: yarn build
run: bun run build

- name: Test
run: yarn test
run: bun run test

- name: Publish
run: yarn publish:latest
run: bun run publish:latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit d818966

Please sign in to comment.