-
Notifications
You must be signed in to change notification settings - Fork 144
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
1 parent
06d4661
commit a5c0526
Showing
2 changed files
with
46 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,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 |
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,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 }} |