Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
guchengxi1994 committed Dec 18, 2024
1 parent 5d8740a commit d6fc3bf
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 261 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/flutter_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
with:
flutter-version: 3.24.5

- name: Bump build number
run: |
flutter pub global activate cider
- name: Set tag name
run: echo "tag_name=v$(cider version)" >> $GITHUB_ENV

- name: "Web Build 🔧"
run: |
cd example/
Expand All @@ -26,4 +33,12 @@ jobs:
uses: JamesIves/github-pages-deploy-action@v4.7.2
with:
branch: gh-pages
folder: ./example/build/web
folder: ./example/build/web

- name: Publish release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
generateReleaseNotes: true
tag: ${{ env.tag_name }}
token: ${{ secrets.RELEASE_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish to Pub.dev

# 流程触发时机,create当有标签tag创建时触发,如 v1.0.0。当然也可以选择别的触发时机,如 push,release 等
on: create
# push:
# branches:
# - master

jobs:
publishing:
runs-on: ubuntu-latest
steps:
# 拉取仓库代码
- name: "Checkout"
uses: actions/checkout@v3
# 发布插件
- name: Dart and Flutter Package Publisher
uses: k-paxian/dart-package-publisher@master
with:
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }}
suppressBuildRunner: true
flutter: true
skipTests: true
force: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ migrate_working_dir/
**/doc/api/
.dart_tool/
build/

/example/pubspec.lock
260 changes: 0 additions & 260 deletions example/pubspec.lock

This file was deleted.

0 comments on commit d6fc3bf

Please sign in to comment.