-
Notifications
You must be signed in to change notification settings - Fork 1
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
77d35b8
commit 6c0db4c
Showing
1 changed file
with
27 additions
and
22 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 |
---|---|---|
@@ -1,26 +1,31 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Publish to pub.dev | ||
|
||
on: | ||
push: | ||
tags: | ||
# must align with the tag-pattern configured on pub.dev, often just replace | ||
# with [0-9]+.[0-9]+.[0-9]+* | ||
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: 'v' | ||
# If you prefer tags like '1.2.3', without the 'v' prefix, then use: | ||
# - '[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: '' | ||
# If your repository contains multiple packages consider a pattern like: | ||
# - 'my_package_name-v[0-9]+.[0-9]+.[0-9]+*' | ||
|
||
# Publish using the reusable workflow from dart-lang. | ||
release: | ||
branches: | ||
- master | ||
jobs: | ||
publish: | ||
permissions: | ||
id-token: write # Required for authentication using OIDC | ||
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | ||
# with: | ||
# working-directory: path/to/package/within/repository | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.3.3' | ||
- name: Install dependencies | ||
run: flutter pub get | ||
- name: Analyze | ||
run: flutter analyze | ||
- name: Run tests | ||
run: flutter test | ||
- name: Format code | ||
run: dart format --fix . | ||
- name: Check Publish Warnings | ||
run: dart pub publish --dry-run | ||
- name: Publish | ||
uses: k-paxian/[email protected] | ||
with: | ||
credentialJson: ${{ secrets.CREDENTIAL_JSON }} | ||
flutter: false | ||
skipTests: true |