Update README.md #18
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
name: Main | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@master | |
with: | |
node-version: 20.9.0 | |
- name: Install dependencies | |
run: npm install | |
- name: Run linter | |
run: npm run lint | |
- name: Perform build | |
run: npm run build | |
- name: Publish demo to github pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist/demo | |
- name: Publish to NPM if version has been updated | |
uses: pascalgn/[email protected] | |
with: | |
tag_name: "v%s" | |
tag_message: "v%s" | |
commit_pattern: "^Release (\\S+)" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |