Skip to content

Commit

Permalink
Add pull request and push workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
clareliguori committed Nov 18, 2019
1 parent 06d4661 commit a5c0526
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on:
[pull_request]

name: Check

jobs:
check:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Run tests
run: |
npm ci
npm test
30 changes: 30 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
push:
branches:
- master

name: Package

jobs:
check:
name: Package distribution file
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
ref: master
- name: Package
run: |
npm ci
npm test
npm run package
- name: Commit
run: |
git config --global user.name "GitHub Actions"
git remote set-url origin https://x-access-token:[email protected]/$GITHUB_REPOSITORY
git add dist/
git commit -m "Update dist" || echo "No changes to commit"
git push origin HEAD:master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a5c0526

Please sign in to comment.