-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |