Skip to content

Commit

Permalink
💚 Test and Build on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tubone24 committed Sep 13, 2020
1 parent 457af2b commit 4904b68
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test and Build

on:
push:
branches:
- '*'
tags-ignore:
- 'v*' # version Tag push use release workflow

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: npm install
- name: Test and Build
run: npm run all
- name: Setup git
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
run: |
git config --local user.name GitHubActions
git remote set-url origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
- name: Git push, tag, upload assets
run: |
git checkout master
git pull origin master
git add -A
DIFF=`git diff --cached --numstat | wc -l`
if [ $DIFF -eq 0 ]; then
exit 0
fi
git commit -am 'GitHub Actions commit' --allow-empty
git push origin master

0 comments on commit 4904b68

Please sign in to comment.