Skip to content

Commit d5798b1

Browse files
authored
Merge pull request #120 from taoyong-ty/master
Add packaging workflow, so that dist folder doesn't get out of date
2 parents bb79642 + c2d09da commit d5798b1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/package.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
name: Package
7+
8+
jobs:
9+
check:
10+
name: Package distribution file
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
ref: main
17+
- name: Package
18+
run: |
19+
npm ci
20+
npm run lint
21+
npm test
22+
npm run package
23+
- name: Commit
24+
run: |
25+
git config --global user.name "GitHub Actions"
26+
git add dist/
27+
git commit -m "chore: Update dist" || echo "No changes to commit"
28+
git push origin HEAD:main

0 commit comments

Comments
 (0)