Skip to content

Commit 20a2113

Browse files
authored
Use CI to publish dart packages (#1001)
1 parent d08cc04 commit 20a2113

File tree

6 files changed

+171
-346
lines changed

6 files changed

+171
-346
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: release-dart
2+
3+
on:
4+
push:
5+
branches:
6+
- ci-pub-dart
7+
tags:
8+
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: 'v{{version}}'
9+
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: release-dart-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
release_dart:
18+
permissions:
19+
id-token: write # Required for authentication using OIDC
20+
name: Release dart
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Setup Flutter SDK
27+
uses: flutter-actions/setup-flutter@v3
28+
with:
29+
channel: stable
30+
version: latest
31+
32+
- uses: dart-lang/setup-dart@v1
33+
34+
- name: Copy pre-build libs
35+
shell: bash
36+
run: |
37+
cd scripts/dart
38+
./release.sh
39+
cd ../..
40+
41+
mv -v sherpa-onnx/flutter /tmp/to-be-published
42+
43+
cp -v README.md /tmp/to-be-published
44+
45+
- name: Release
46+
shell: bash
47+
run: |
48+
cd /tmp/to-be-published
49+
flutter pub get
50+
flutter pub publish --dry-run
51+
flutter pub publish --force

0 commit comments

Comments
 (0)