-
Notifications
You must be signed in to change notification settings - Fork 447
50 lines (41 loc) · 1.3 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: leapjs - Build Library and Run Unit Tests
on: [push, pull_request]
jobs:
build:
name: Build Library and Run Unit Tests
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v2
# Install Node
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
# Install Dependencies
- name: Install NPM Dependencies
run: npm ci
# Build and Run Tests
- name: Build Library and Run Tests
run: ./node_modules/.bin/grunt test
# Commit All Build Artifacts
- name: Commit Build Artifacts
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
set +e
git add *
git diff-index --quiet HEAD || git commit -m "Build Leap.js"
# Push Build Artifacts
- name: Push Changes to branch
id: push-build
uses: ad-m/github-push-action@master
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
# Reenable Errors
- name: Clean Up
if: steps.push-build.outcome == 'success' && steps.push-build.conclusion == 'success'
run: set -e