Skip to content

Commit fc6a553

Browse files
committed
chore: updated release.yaml to use the recommended Dart approach
1 parent c5ce52c commit fc6a553

File tree

1 file changed

+9
-23
lines changed

1 file changed

+9
-23
lines changed

.github/workflows/release.yaml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,15 @@ name: Release
22

33
on:
44
workflow_dispatch:
5+
push:
6+
tags:
7+
- 'v[0-9]+.[0-9]+.[0-9]+*'
58

69
jobs:
710
publish:
8-
name: Publish to pub.dev
9-
runs-on: ubuntu-latest
10-
11-
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v4
14-
15-
- name: Set up Flutter
16-
uses: subosito/flutter-action@v2
17-
with:
18-
flutter-version: 'stable'
19-
20-
- name: Install dependencies
21-
run: flutter pub get
22-
23-
- name: Verify plugin format
24-
run: flutter format --set-exit-if-changed .
25-
26-
- name: Run pub publish dry-run
27-
run: flutter pub publish --dry-run
28-
29-
- name: Publish to pub.dev
30-
run: echo "${{ secrets.PUB_DEV_PUBLISH_TOKEN }}" | flutter pub publish --force --access-token
11+
permissions:
12+
id-token: write # Required for authentication using OIDC
13+
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
14+
with:
15+
environment: 'pub.dev'
16+
# working-directory: path/to/package/within/repository

0 commit comments

Comments
 (0)