Skip to content

Commit

Permalink
publish
Browse files Browse the repository at this point in the history
  • Loading branch information
IoTServ committed May 25, 2023
1 parent 00c8524 commit 586ffc1
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
name: Publish to Pub.dev
# .github/workflows/publish.yml
name: Publish to pub.dev

on:
push:
tags:
- '*'
# must align with the tag-pattern configured on pub.dev, often just replace
# with [0-9]+.[0-9]+.[0-9]+*
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: 'v'
# If you prefer tags like '1.2.3', without the 'v' prefix, then use:
# - '[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: ''
# If your repository contains multiple packages consider a pattern like:
# - 'my_package_name-v[0-9]+.[0-9]+.[0-9]+*'

# Publish using the reusable workflow from dart-lang.
jobs:
publishing:
runs-on: ubuntu-latest
steps:
# 拉取仓库代码
- name: "Checkout"
uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- run: flutter pub get
- name: Credentials
run: echo ${{ secrets.CREDENTIAL_JSON }} > $PUB_CACHE/credentials.json
# 发布插件
- name: Publish
run: flutter packages pub publish -f
publish:
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
# with:
# working-directory: path/to/package/within/repository

0 comments on commit 586ffc1

Please sign in to comment.