Skip to content

Commit

Permalink
ci: switch to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sammarks committed Dec 22, 2020
1 parent b2ea361 commit 0cb282e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 19 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and Release
on: ['push']
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['10', '12', '14']
name: Node v${{ matrix.node }}
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm run test:prod
- run: npm run build
- run: npm run report-coverage
if: matrix.node == '12'
release:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 12
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm run deploy-docs
- run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

0 comments on commit 0cb282e

Please sign in to comment.