Skip to content

Commit

Permalink
CI: run test on master branch, on release publish to github npm registry
Browse files Browse the repository at this point in the history
bump version
  • Loading branch information
ramilexe committed Mar 24, 2021
1 parent 1e2b64d commit f29394a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/on-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ on:
- master

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run test
- run: npm run lint
- run: npm run build

build:
name: Run docker build
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/on-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- run: npm ci
- run: npm run test
- run: npm run lint
- run: npm run build

build:
name: Run docker build
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,23 @@ on:
release:
types: [published]
jobs:
push_to_registries:
npm_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 15
- run: npm ci
- run: npm run test
- run: npm run lint
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
registry: https://npm.pkg.github.com/

docker_publish:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vulcanize/eth-watcher-ts",
"version": "0.0.14",
"version": "0.0.15",
"type": "commonjs",
"types": "./dist",
"main": "./dist/server.js",
Expand Down

0 comments on commit f29394a

Please sign in to comment.