Skip to content

Commit

Permalink
Update workflows/publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mounir-Bouaiche committed May 31, 2024
1 parent 1594042 commit 7983fa5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
name: Publish to Pub.dev

# 流程触发时机,当有标签创建时触发,如 v1.0.0。当然也可以选择别的触发时机,如 push,release 等
on: create
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@v2
uses: actions/checkout@main
# 发布插件
- name: Dart and Flutter Package Publisher
uses: k-paxian/dart-package-publisher@v1.2
uses: k-paxian/dart-package-publisher@master
with:
# 设置发布插件需要的 Token
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}
Expand Down

0 comments on commit 7983fa5

Please sign in to comment.