feat: use quark-static cdn #150
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 | |
on: | |
# push 事件触发 | |
push: | |
branches: [ main ] | |
# quark-doc-header 事件触发 | |
repository_dispatch: | |
types: [my-event] | |
jobs: | |
publish-to-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 初始化node环境 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org/ # 如果不配置将影响publish | |
# 修改package.json版本号, 修改后提交到仓库 | |
- name: Bump version and push to GitHub | |
uses: 'phips28/gh-action-bump-version@master' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GIT_ACTION }} | |
with: | |
# minor-wording: 'add,Adds,new' | |
# major-wording: 'MAJOR,cut-major' | |
patch-wording: 'patch,fixes' # Providing patch-wording will override commits | |
# patch-wording: 'feat,release' # Providing patch-wording will override commits | |
# defaulting to a patch bump. | |
# rc-wording: 'RELEASE,alpha' | |
- run: npm install | |
# - run: npm run build # npm publish的时候会自动执行 prepublishOnly 脚本(package.json) | |
- name: Publish to NPM | |
run: npm publish || true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- 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 1 | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.GIT_ACTION }} | |
repository: hellof2e/quarkd-docs-vue | |
event-type: my-event | |
# 当前 action 执行后触发另一个仓库的 action 执行 | |
- name: Trigger Action 2 | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.GIT_ACTION }} | |
repository: hellof2e/quarkd-docs-react | |
event-type: my-event | |
# 当前 action 执行后触发另一个仓库的 action 执行 | |
- name: Trigger Action 3 | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.GIT_ACTION }} | |
repository: hellof2e/quarkd-docs-vanilla | |
event-type: my-event | |
# 当前 action 执行后触发另一个仓库的 action 执行 | |
- name: Trigger Action 4 | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.GIT_ACTION }} | |
repository: hellof2e/quarkd-docs-angular | |
event-type: my-event | |
# 当前 action 执行后触发另一个仓库的 action 执行 | |
- name: Trigger Action 5 | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.GIT_ACTION }} | |
repository: hellof2e/quarkd-docs-svelte | |
event-type: my-event |