Skip to content

Commit

Permalink
Add ci/cd workflows for lint and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
s1owjke committed Jan 19, 2025
1 parent 9ebb821 commit 5be9aae
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint

on:
push:
branches:
- master

pull_request:
branches:
- '*'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v4

- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Run lint
run: yarn lint

- name: Check types
run: yarn typecheck
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish

on:
release:
types: [released]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Git checkout
uses: actions/checkout@v4

- name: Install node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: yarn

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Build package
run: yarn build

- name: Publish to registry
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 5be9aae

Please # to comment.