Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
add GH action (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
renancaraujo committed Aug 10, 2020
1 parent 6ae895f commit e2cb5b6
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 110 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Test

on: push

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: 'beta'
- run: flutter --version
- run: flutter pub get
- run: ./scripts/lint.sh
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[![Pub](https://img.shields.io/pub/v/flame_flare.svg?style=popout)](https://pub.dartlang.org/packages/flame_flare)
![Test](https://github.com/flame-engine/flame_flare/workflows/Test/badge.svg?branch=master&event=push)
![Test](https://github.com/flame-engine/flame_flare/workflows/Test/badge.svg?branch=master&event=push)
[![Discord](https://img.shields.io/discord/509714518008528896.svg)](https://discord.gg/pxrBmy4)

# Flame Flare

Integrate awesome [Flare animations](https://rive.app/explore/popular/trending/all) to your [Flame](https://flame-engine.org/) game.



## Install

Add `flame_flare` as a dependency in your pubspec.yaml file ([what?](https://flutter.io/using-packages/)).
Expand Down Expand Up @@ -50,4 +49,14 @@ class MyAnimationComponent extends FlareActorComponent {
}
```

See the example app for a slightly more complex usage.
See the example app for a slightly more complex usage.

## Support

The simplest way to show us your support is by giving the project a star.

You can also support us by becoming a patron on Patreon:
[![Patreon](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/fireslime)

Or by making a single donation by buying us a coffee:
[![Buy Me A Coffee](https://user-images.githubusercontent.com/835641/60540201-fcd7fa00-9ce4-11e9-87ec-1e98568e9f58.png)](https://www.buymeacoffee.com/fireslime)
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class MyGame extends BaseGame with TapDetector, DoubleTapDetector {
} else {
_currentAnimation++;
}
minionComponent.minionController.play(_animations[_currentAnimation]);
minionController.play(_animations[_currentAnimation]);
}

@override
Expand Down
14 changes: 7 additions & 7 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety"
version: "1.1.0-nullsafety.2"
charcode:
dependency: transitive
description:
Expand All @@ -49,7 +49,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety"
version: "1.15.0-nullsafety.2"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -98,7 +98,7 @@ packages:
name: flare_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.0.6"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -122,7 +122,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety"
version: "1.3.0-nullsafety.2"
ordered_set:
dependency: transitive
description:
Expand Down Expand Up @@ -218,7 +218,7 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety"
version: "1.3.0-nullsafety.2"
uuid:
dependency: transitive
description:
Expand All @@ -232,7 +232,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety"
version: "2.1.0-nullsafety.2"
xdg_directories:
dependency: transitive
description:
Expand All @@ -248,5 +248,5 @@ packages:
source: hosted
version: "4.3.0"
sdks:
dart: ">=2.9.0-18.0 <2.9.0"
dart: ">=2.10.0-0.0.dev <2.10.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
105 changes: 8 additions & 97 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.0"
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.2"
audioplayers:
dependency: transitive
description:
name: audioplayers
url: "https://pub.dartlang.org"
source: hosted
version: "0.15.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
box2d_flame:
dependency: transitive
description:
Expand All @@ -49,28 +35,21 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety"
version: "1.1.0-nullsafety.2"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.3"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety"
version: "1.15.0-nullsafety.2"
convert:
dependency: transitive
description:
Expand All @@ -85,20 +64,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.5"
dashbook:
dependency: "direct dev"
description:
name: dashbook
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.6"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
file:
dependency: transitive
description:
Expand All @@ -114,7 +79,7 @@ packages:
source: hosted
version: "0.24.0"
flare_dart:
dependency: transitive
dependency: "direct main"
description:
name: flare_dart
url: "https://pub.dartlang.org"
Expand All @@ -126,17 +91,12 @@ packages:
name: flare_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
version: "2.0.6"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
Expand All @@ -149,20 +109,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.1"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.9"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety"
version: "1.3.0-nullsafety.2"
ordered_set:
dependency: transitive
description:
Expand Down Expand Up @@ -238,55 +191,13 @@ packages:
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.5"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
synchronized:
dependency: transitive
description:
name: synchronized
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0+1"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.18"
tiled:
dependency: transitive
description:
Expand All @@ -300,7 +211,7 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety"
version: "1.3.0-nullsafety.2"
uuid:
dependency: transitive
description:
Expand All @@ -314,7 +225,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety"
version: "2.1.0-nullsafety.2"
xdg_directories:
dependency: transitive
description:
Expand All @@ -330,5 +241,5 @@ packages:
source: hosted
version: "4.2.0"
sdks:
dart: ">=2.9.0-18.0 <2.9.0"
dart: ">=2.10.0-0.0.dev <2.10.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
6 changes: 4 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: flame_flare
description: This packages allows you to use flare animations into a flame game.
version: 0.0.1
homepage:
homepage: https://github.com/flame-engine/flame_flare


environment:
sdk: ">=2.7.0 <3.0.0"

dependencies:
flame: '>=0.24.0 <1.0.0'
flare_flutter: ^2.0.5
flare_flutter: ^2.0.6
flare_dart: ^2.3.4
flutter:
sdk: flutter

Expand Down
29 changes: 29 additions & 0 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
FORMAT_ISSUES=$(flutter format --set-exit-if-changed -n .)
if [ $? -eq 1 ]; then
echo "flutter format issues on"
echo $FORMAT_ISSUES
exit 1
fi

flutter pub get

# We need to run pubget on all the examples
for f in doc/examples/**/pubspec.yaml; do
d=$(dirname $f)
cd $d
flutter pub get
cd - > /dev/null
done

cd .
flutter pub get
result=$(flutter analyze .)
if ! echo "$result" | grep -q "No issues found!"; then
echo "$result"
echo "flutter analyze issue: $1"
exit 1
fi

echo "success"
exit 0

0 comments on commit e2cb5b6

Please sign in to comment.