chore: release v1.1.8 #23
Workflow file for this run
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 | |
permissions: | |
contents: write | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 签出代码 | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 打印工作目录和文件结构 | |
run: | | |
pwd | |
ls -R | |
- name: 设置nodejs | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
registry-url: 'https://registry.npmjs.org' | |
- name: 安装依赖 | |
run: npm install | |
- name: 运行构建 | |
run: npm run build | |
- name: 生成changelog | |
run: npx changelogithub | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: 预览发布内容 | |
run: npm pack | |
- name: 发布到npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |