diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..f14dc425 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,16 @@ +on: + push: + # branches: dev + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + - run: npm ci + - run: npm build:all + - run: npm test:all + - uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_PUBLISH }} diff --git a/package.json b/package.json index e0300491..d72b1824 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "scripts": { "build": "tsc", "build:deps": "npx lerna run build", - "build:all": "npm run build && npm run build", + "build:all": "npm run build:deps && npm run build", "build:clean": "rimraf ./build", "build:watch": "tsc --watch src --watch ../spark-protocol/dist --ignore data", "lint": "eslint --fix --max-warnings 0 ./src", @@ -45,6 +45,7 @@ "start:warn": "ts-node ./src/main.ts --trace-warnings | bunyan", "test": "jest", "test:deps": "npx lerna run test", + "test:all": "npm run test:deps && npm run test", "test:watch": "jest --watch", "watch": "tsc --watch", "update-firmware": "node ./node_modules/spark-protocol/dist/scripts/update-firmware-binaries",