Skip to content

Commit

Permalink
feat(ci): Added github actions (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian-Schopp authored Jan 26, 2023
1 parent bfef886 commit fbb27bb
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: node-jet CI
env:
NODE_VERSION: '19.x'
on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci
- run: npm run ci:eslint
- run: npm run ci:prettier
- run: npm run ci:type-check
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,24 @@
"files": [
"lib"
],
"version": "3.0.0-beta-7",
"version": "3.0.1",
"repository": {
"type": "git",
"url": "https://github.com/HBM/node-jet"
},
"license": "MIT",
"config": {
"files": "**/*.{js,jsx,ts,tsx,json,html,yml}"
},
"scripts": {
"test": "jest",
"build": "tsc",
"server": "node examples/server",
"prettier": "prettier --write \"./**/*.{js,jsx,ts,tsx,json,html}\"",
"eslint": "eslint --max-warnings 0 \"{src, test}/**/*.{js,jsx,ts,tsx,json,html}\"",
"ci:eslint": "eslint --max-warnings 0 --ignore-path .prettierignore $npm_package_config_files",
"ci:prettier": "prettier --check $npm_package_config_files ",
"ci:type-check": "tsc --noEmit --skipLibCheck",
"prettier": "prettier --write $npm_package_config_files",
"eslint": "eslint --max-warnings 0 $npm_package_config_files",
"start": "./bin/jetd.js"
},
"engines": {
Expand Down

0 comments on commit fbb27bb

Please sign in to comment.