fix: upgraded node to v20, fixed release config #33
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-main | |
on: | |
push: | |
branches: [main] | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [20] | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup node env 🏗 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
check-latest: true | |
- name: Setup pnpm 📦 | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.9.2 | |
- name: Install dependencies 📦 | |
run: pnpm install | |
- name: Run linter 👀 | |
run: pnpm run lint-fix | |
- name: Typecheck 👀 | |
run: pnpm run typecheck | |
- name: Run tests 🧪 | |
run: pnpm run test:unit | |
- name: Build | |
run: pnpm run build | |
release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [20] | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup node env 🏗 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
check-latest: true | |
- name: Setup pnpm 📦 | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.9.2 | |
- name: Install dependencies 📦 | |
run: pnpm install | |
- name: Install semantic-release extra plugins 📦 | |
run: pnpm install --save-dev semantic-release @semantic-release/changelog @semantic-release/git | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release |