forked from kin-labs/kinetic-dart-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
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
c2b57a5
commit d03c8f7
Showing
1 changed file
with
29 additions
and
37 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,46 +1,38 @@ | ||
name: Dart | ||
name: Dart Package | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
branches: | ||
- main | ||
pull_request: | ||
branches: [ "main" ] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Setting up the Flutter SDK | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.22.2' | ||
|
||
- name: Install dependencies | ||
run: flutter pub get | ||
|
||
# Uncomment this step to verify the use of 'dart format' on each commit. | ||
# - name: Verify formatting | ||
# run: flutter format --output=none --set-exit-if-changed . | ||
|
||
# Conditional step for analyzing the project source | ||
#- name: Analyze project source | ||
# if: ${{ secrets.SKIP_ANALYZE != 'true' }} | ||
# run: flutter analyze | ||
|
||
# Run tests | ||
# - name: Run tests | ||
# run: flutter test | ||
|
||
- name: dart-package | ||
uses: nikosportolos/dart_package@v0.2.1 | ||
with: | ||
coverage: false | ||
codecov: false | ||
codecov_token: ${{ secrets.CODECOV_TOKEN }} | ||
publish: true | ||
pubdev_token: ${{ secrets.PUBDEV_TOKEN }} | ||
sdk: flutter | ||
flutter-sdk: '3.22.2' | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Dart | ||
uses: nikosportolos/dart_package@v0.2.1 | ||
with: | ||
sdk: 'stable' | ||
|
||
- name: Install dependencies | ||
run: dart pub get | ||
|
||
- name: Run tests | ||
run: dart test | ||
|
||
- name: Publish to pub.dev (dry run) | ||
env: | ||
PUB_DEV_TOKEN: ${{ secrets.PUB_DEV_TOKEN }} | ||
run: dart pub publish --dry-run | ||
|
||
- name: Publish to pub.dev | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
env: | ||
PUB_DEV_TOKEN: ${{ secrets.PUB_DEV_TOK |