Update README.md #11
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: Publish to Pub.dev | ||
# 流程触发时机,当有标签创建时触发,如 v1.0.0。当然也可以选择别的触发时机,如 push,release 等 | ||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag pattern on pub.dev: 'v' | ||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag pattern on pub.dev: 'v' | ||
jobs: | ||
publishing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# 拉去仓库代码 | ||
- name: 'Checkout' | ||
uses: actions/checkout@main # required! | ||
# 发布插件 | ||
- name: '>> Publich package to pub.dev <<' | ||
uses: k-paxian/dart-package-publisher@master | ||
with: | ||
# 设置发布插件需要的 Token | ||
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }} | ||
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }} |