update: react 18 + vite #15
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: CI | |
on: push | |
jobs: | |
test-lint-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
- name: Restore node modules cache | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Install Dependencies | |
run: yarn install | |
- name: Lint code | |
run: yarn lint | |
- name: Build | |
run: yarn build | |
publish: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: test-lint-build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 12 | |
- name: Restore node modules cache | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Install Dependencies | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Release | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
run: npx semantic-release |