-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add github actions for CI and release
- Loading branch information
1 parent
9047c14
commit d13aeb9
Showing
3 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Setup | ||
description: Setup Bun, Node and install packages | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Bun | ||
uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: latest | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install packages | ||
shell: bash | ||
run: bun install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
format: | ||
name: 💅 Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Run format | ||
run: bun run format:check | ||
|
||
lint: | ||
name: 🕵 Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Run lint | ||
run: bun run lint | ||
|
||
typecheck: | ||
name: ✅ Typecheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Run typecheck | ||
run: bun run typecheck | ||
|
||
build: | ||
name: 🧰 Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Run build | ||
run: bun run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Create Release Pull Request or Publish to NPM | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: bun run release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |