Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to bun #42

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,41 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- uses: oven-sh/setup-bun@v2
with:
node-version-file: .nvmrc
cache: yarn
bun-version: latest

- run: yarn install
- run: bun install

- run: yarn lint
- run: bun lint

- run: yarn typecheck
- run: bun typecheck

publish-to-npm:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn
cache: bun
registry-url: https://registry.npmjs.org/
scope: '@kingstinct'

- run: git config user.name "$(git log -n 1 --pretty=format:%an)"
- run: git config user.email "$(git log -n 1 --pretty=format:%ae)"
- run: echo "versionTag=`npm version ${{ github.event.inputs.release_type }} -m "%s ${{ github.event.inputs.description }}"`" >> $GITHUB_ENV
- run: yarn install
- run: bun install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

- run: git push --follow-tags
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Release
uses: softprops/action-gh-release@v1
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- uses: oven-sh/setup-bun@v2
with:
node-version-file: .nvmrc
cache: yarn
bun-version: latest

- run: yarn install
- run: bun install

- run: npx pkg-pr-new publish
- run: bunx pkg-pr-new publish
57 changes: 25 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,53 +11,53 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- uses: oven-sh/setup-bun@v2
with:
node-version-file: .nvmrc
cache: yarn
bun-version: latest

- run: yarn install
- run: bun install

- run: yarn lint
- run: bun lint

typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- uses: oven-sh/setup-bun@v2
with:
node-version-file: .nvmrc
cache: yarn
bun-version: latest

- run: yarn install
- run: bun install

- run: yarn typecheck
- run: bun typecheck

typecheck-example:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- uses: oven-sh/setup-bun@v2
with:
node-version-file: .nvmrc
cache: yarn
bun-version: latest

- run: yarn install
- run: bun install

- run: npm install
- run: bun install
working-directory: example
- run: yarn typecheck

- run: bun typecheck
working-directory: example

swift-lint:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3

- uses: oven-sh/setup-bun@v2
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: example/package-lock.json
bun-version: latest

- uses: actions/cache@v4
with:
Expand All @@ -66,7 +66,7 @@ jobs:
restore-keys: |
${{ runner.os }}-pods-

- run: npm install
- run: bun install
working-directory: example

- run: pod install
Expand All @@ -79,18 +79,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
- uses: oven-sh/setup-bun@v2
with:
node-version-file: .nvmrc
cache: yarn

- run: yarn install
bun-version: latest

- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: example/package-lock.json
- run: bun install

- uses: actions/cache@v4
with:
Expand All @@ -113,7 +106,7 @@ jobs:
- name: Set up Xcode version
run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer

- run: npm install
- run: bun install
working-directory: example

- run: pod install
Expand Down
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

Loading
Loading