Commit 6d6d8f5f authored by carlos's avatar carlos

chore: using github actions

parent ab58dd04
name: Publish to Github Packages
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- name: run build
run: |
yarn
yarn version --no-git-tag-version --no-commit-hooks --new-version ${RELEASE_VERSION/v}
yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
name: Node.js CI
on:
push:
branches:
- master
pull_request:
branches:
- '*'
jobs:
build:
if: "!contains(github.event.commits[0].message, '[SKIP CI]')"
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: run test
run: |
yarn
yarn test
env:
CI: true
language: node_js
node_js:
- 9
script:
- npm test
cache:
directories:
- "node_modules"
deploy:
provider: npm
email: echoulen@gmail.com
api_key: $NPM_TOKEN
on:
tags: true
skip_cleanup: true
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
"dev": "webpack-dev-server", "dev": "webpack-dev-server",
"pretest": "rimraf dist && tslint --project . && tsc -p .", "pretest": "rimraf dist && tslint --project . && tsc -p .",
"test": "jest --config=jestconfig.json", "test": "jest --config=jestconfig.json",
"prepublish": "npm test",
"prepare": "rimraf dist && tsc -p ." "prepare": "rimraf dist && tsc -p ."
}, },
"repository": { "repository": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment