Skip to content

Commit

Permalink
chore: add lint and release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
headlessme committed Mar 15, 2023
1 parent 9cefa15 commit db0b3fa
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
name: Install NodeJS
with:
node-version: '18'

- run: npm ci

- run: npm run lint
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release

on:
push:
tags:
- v*.*.*

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'

- run: npm ci

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
This SDK is only available via NPM. To deploy a new version:

```
npm publish
standard-version
```
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"main": "js/index.js",
"types": "ts/index.d.ts",
"scripts": {
"lint-fix": "ts-standard ts/*.d.ts --fix",
"lint": "ts-standard ts/*.d.ts",
"lint:fix": "ts-standard ts/*.d.ts --fix",
"start:dev": "nodemon --exec ./scripts/copy.sh"
},
"author": {
Expand Down

0 comments on commit db0b3fa

Please sign in to comment.