Skip to content

Commit

Permalink
Merge pull request #3 from botpress/cc-add-checks
Browse files Browse the repository at this point in the history
feat: Add CI checks
  • Loading branch information
charlescatta authored Mar 11, 2024
2 parents 0271be4 + f457138 commit 94ff6b3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: deploy

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch: {}

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18.18.2"
- run: npm install --frozen-lockfile
- run: npm run build
- run: npm run type:check
- run: npm run test
- name: Publish to NPM
if: github.ref == 'refs/heads/master' || github.event_name == 'workflow_dispatch'
uses: botpress/gh-actions/publish-if-not-exists@master
with:
path: "."
token: "${{ secrets.NPM_ACCESS_TOKEN }}"
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"build:types": "tsc -p tsconfig.types.json",
"build:cjs": "tsc -p tsconfig.cjs.json && node postcjs.js",
"build:esm": "tsc -p tsconfig.esm.json && node postesm.js",
"build": "npm i && npm run gen && npm test && rimraf ./dist && npm run build:types && npm run build:cjs && npm run build:esm",
"type:check": "tsc --noEmit",
"build": "rimraf ./dist && npm run gen && npm run build:types && npm run build:cjs && npm run build:esm",
"dry": "npm run build && npm pub --dry-run",
"dev": "tsx watch test/index.ts",
"gen": "tsx ./createIndex.ts",
Expand Down Expand Up @@ -56,4 +57,4 @@
"typescript": "^5.2.2",
"zod": "^3.22.4"
}
}
}

0 comments on commit 94ff6b3

Please sign in to comment.