build(deps-dev): bump vite from 2.9.17 to 2.9.18 (#60) #45
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: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 6.0.2 | |
- name: Cache pnpm modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run linter | |
run: pnpm lint | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 6.0.2 | |
- name: Cache pnpm modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run unit tests | |
run: pnpm test | |
release: | |
name: Build | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 6.0.2 | |
- name: Cache pnpm modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run build | |
run: npm run build | |
- name: Create release directory | |
run: mkdir -p ./release | |
- name: Package build | |
run: npm run pack | |
- name: Release | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |