Skip to content

Commit

Permalink
Add Github workflows for CI (#74)
Browse files Browse the repository at this point in the history
* Create build-and-test.yml

* Create publish.yml

* Update publish.yml

* Update publish.yml

* Update build-and-test.yml

* Update build-and-test.yml

* Update build-and-test.yml
  • Loading branch information
Abbondanzo authored Dec 6, 2019
1 parent 384a794 commit dc06c5f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Build and Test"

on:
push:
paths:
- 'src/*'
- 'docs/*'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Install packages
run: npm ci
- name: Build the project
run: npm run build
- name: Run linter
uses: mooyoul/tslint-actions@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
pattern: '*.ts'
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish to NPM

on:
release:
types: [published]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Install packages
run: npm ci
- name: Build the project
run: npm run build
- name: Publish to NPM
uses: primer/publish@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
args: '--dir=lib'

0 comments on commit dc06c5f

Please sign in to comment.