Skip to content

Commit

Permalink
feat(Build): Using GitHub Actions
Browse files Browse the repository at this point in the history
see #319
  • Loading branch information
hypery2k committed Dec 3, 2019
1 parent fcc9903 commit 2633fd0
Show file tree
Hide file tree
Showing 5 changed files with 370 additions and 544 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on: [push]

jobs:
build:
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [10, 12, 13]
# Windows (windows-latest) doesn't work with karma
os: [ubuntu-latest, macOS-latest]

steps:
- uses: actions/checkout@v1

- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
version: ${{ matrix.node_version }}

- name: npm install, build and test
run: |
npm install
npm run build
npm run test
deploy:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12

- name: publish release package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
npm i
npm publish
if: github.ref == 'master'

- name: publish preview package
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
CURRENT_TIME=$(date +%s)
NEW_VERSION=${PACKAGE_VERSION}-build${CURRENT_TIME}
npm i
npm version $NEW_VERSION --no-git-tag-version
npm publish --tag next
if: github.ref == 'develop'
57 changes: 0 additions & 57 deletions Jenkinsfile

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ An angular 2+ vis.js project

# Usage

git commit --no-verify

## Installation

```
Expand Down

0 comments on commit 2633fd0

Please sign in to comment.