Skip to content

feat: update release yml #10

feat: update release yml

feat: update release yml #10

# # 当 quark-doc-header 有新版本发布,会自动触发当前工程 action 执行
# name: Repository Dispatch
# on:
# repository_dispatch:
# types: [my-event]
# jobs:
# myEvent:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3 # 检出仓库
# - name: 初始化node环境
# uses: actions/setup-node@v1
# with:
# node-version: ${{ matrix.node-version }}
# registry-url: https://registry.npmjs.org/ # 如果不配置将影响publish
# - run: npm install
# - run: npm run build
# - run: npm run release:patch # 发布新版本
# - name: publish # 向npm publish 代码 请遵循npm规范.
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} # 该token是 npm的token 获取npm token请查看 步骤2 的创建 npm token 和 将npm token 放入github的 secrets下
# run: npm publish
# # 到这如果全部成功,那么我们就成功的将代码发布到了npm
# # 下面主要是创建 github 的release
# # 需要手动修改 package.json 版本
# # 使用 tyankatsu0105/read-package-version-actions@v1 工具来读取对应的package.json 数据
# - name: Read package.json
# uses: tyankatsu0105/read-package-version-actions@v1
# id: package-version
# # 关于创建 release 的更多参数,可以查看 actions/create-release@v1
# - name: Create Release for Tag
# id: release_tag
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GIT_ACTION }} # 这块需要用到 github的token,因为需要对分之进行代码推送
# with:
# tag_name: v${{ steps.package-version.outputs.version }}
# release_name: Release v${{ steps.package-version.outputs.version }}
# prerelease: false # 是否为预发布版本
# # body: |
# # 请点击查看 [更新日志]().
# # 当前 action 执行后触发另一个仓库的 action 执行
# - name: Trigger Action
# uses: peter-evans/repository-dispatch@v3
# with:
# token: ${{ secrets.GIT_ACTION }}
# repository: hellof2e/vue-quarkdesign.hellobike.com
# event-type: my-event