Skip to content

Commit

Permalink
ci: Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Oct 27, 2024
1 parent 2b14ff1 commit 210460d
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
pull_request:
branches: ["*"]
push:
branches: ["main"]
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

env:
FORCE_COLOR: 3

jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
registry-url: https://registry.npmjs.org

- shell: bash
run: corepack enable

- shell: bash
run: pnpm install

- name: Typecheck
run: pnpm typecheck
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish Package to npm
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"
registry-url: https://registry.npmjs.org

- shell: bash
run: corepack enable

- shell: bash
run: pnpm install

- name: Build
run: pnpm build

- run: pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

0 comments on commit 210460d

Please sign in to comment.