Skip to content

Commit 7983fa5

Browse files
Update workflows/publish.yml
1 parent 1594042 commit 7983fa5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
name: Publish to Pub.dev
22

33
# 流程触发时机,当有标签创建时触发,如 v1.0.0。当然也可以选择别的触发时机,如 push,release 等
4-
on: create
4+
on:
5+
push:
6+
tags:
7+
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag pattern on pub.dev: 'v'
58

69
jobs:
710
publishing:
811
runs-on: ubuntu-latest
912
steps:
1013
# 拉去仓库代码
1114
- name: "Checkout"
12-
uses: actions/checkout@v2
15+
uses: actions/checkout@main
1316
# 发布插件
1417
- name: Dart and Flutter Package Publisher
15-
uses: k-paxian/dart-package-publisher@v1.2
18+
uses: k-paxian/dart-package-publisher@master
1619
with:
1720
# 设置发布插件需要的 Token
1821
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)