minor: 添加命名空间 npmrc #6
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: Relsase and Publish | |
on: | |
# 指明要运行的分支,跟上面配置保持一致 | |
push: | |
branches: [main] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 签出代码 | |
uses: actions/checkout@v3 | |
- name: 安装 nodejs | |
uses: actions/[email protected] | |
with: | |
node-version: "20.8.1" | |
- name: 打包构建 | |
run: | | |
npm install -g pnpm@latest-8 | |
chmod +x ./build.sh | |
./build.sh | |
# 执行 semantic-release 发布包 | |
- name: 发布 npm 包 | |
env: | |
GITHUB_TOKEN: ${{ secrets.PUBLISH_GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.PUBLISH_NPM_TOKEN }} | |
run: npx semantic-release | |
working-directory: packages/server |