refactor: simplify release workflow by removing manual version input … #1
This file contains hidden or 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: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
- name: Enable Corepack | |
run: npm i -g --force corepack@latest && corepack enable | |
- name: Install dependencies | |
run: npx nypm@latest i | |
- name: Build | |
run: npm run prepack | |
- name: Playground prepare | |
run: npm run dev:prepare | |
- name: Test | |
run: npm run test | |
- name: Release | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |