Skip to content

Commit

Permalink
Merge pull request #45 from themesberg/setup-CI
Browse files Browse the repository at this point in the history
chore: setup CI
  • Loading branch information
SutuSebastian authored Apr 22, 2024
2 parents 7516feb + 063d0c9 commit 0758574
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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: Install packages
shell: bash
run: bun install
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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

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
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0758574

Please sign in to comment.