-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: 💚 Add Github action to publish on pub.dev
- Loading branch information
Showing
1 changed file
with
33 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,33 @@ | ||
name: Publish to pub.dev | ||
|
||
on: | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" # tag pattern on pub.dev: '{{version}}' | ||
- "[0-9]+.[0-9]+.[0-9]+-*" # tag pattern on pub.dev: '{{version}}-{suffix}' | ||
|
||
# Publish using custom workflow | ||
jobs: | ||
publish: | ||
permissions: | ||
id-token: write # Required for authentication using OIDC | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dart-lang/setup-dart@v1 | ||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
flutter-version: "3.22.3" | ||
- name: Install dependencies | ||
run: flutter pub get | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.17.0 | ||
- name: Install typescript dependencies | ||
run: npm install | ||
- name: Build typescript | ||
run: npm run build | ||
- name: Publish | ||
run: dart pub publish --force |