-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4769475
commit 238ba82
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Publish to pub.dev | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+*' | ||
|
||
# based on dart-lang/setup-dart/.github/workflows/publish.yml@v1 | ||
# custimized for flutter | ||
|
||
jobs: | ||
publish: | ||
name: 'Publish to pub.dev' | ||
permissions: | ||
id-token: write # Required for authentication using OIDC | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout repository | ||
- uses: actions/checkout@v4 | ||
|
||
# Setup Dart SDK with JWT token | ||
- uses: dart-lang/setup-dart@v1 | ||
with: | ||
sdk: stable | ||
|
||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: stable | ||
|
||
# Minimal package setup and dry run checks. | ||
- name: Install dependencies | ||
run: flutter pub get | ||
- name: Publish - dry run | ||
run: dart pub publish --dry-run | ||
|
||
# Publishing... | ||
- name: Publish to pub.dev | ||
run: dart pub publish -f |