Skip to content

Commit

Permalink
Merge branch 'release/1.5.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
deandreamatias committed Dec 26, 2020
2 parents 5c33b37 + 84c5c29 commit ac0ad0b
Show file tree
Hide file tree
Showing 39 changed files with 572 additions and 110 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy_app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy app
on:
create:
tags:
-
jobs:
analyze-and-test:
name: run analyze code and basic tests
runs-on: ubuntu-latest
steps:
- name: configure enviroment
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
- uses: actions/setup-java@v1
with:
java-version: '8.x'
- uses: subosito/flutter-action@v1
with:
channel: 'beta'
- run: dart .tool/env.dart
env:
API_KEY_TMDB: ${{ secrets.API_KEY_TMDB }}
- name: get flutter dependencies
run: flutter pub get
- name: get node dependencies
run: npm install
- name: enable flutter web
run: flutter config --enable-web
- name: verify assets
run: comparejson -e ./assets/i18n/*.json
- name: code analyze
run: flutter analyze
- name: unit tests
run: flutter test
- name: build web app
run: flutter build web -t lib/main_prod.dart
- name: minimize assets
run: npm run minimize
- name: deploy to web
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/integration_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Integration test
on:
push:
branches:
- "main"
- "develop"
jobs:
android-integration-test:
name: run integration test on Android emulator
runs-on: macos-latest
steps:
- name: configure enviroment
uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '8.x'
- run: echo $SIGNING_KEY | base64 -d > android/app/key.jks
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- run: dart .tool/env.dart
env:
API_KEY_TMDB: ${{ secrets.API_KEY_TMDB }}
- run: flutter pub get
- run: flutter pub get
- name: code analyze
run: flutter analyze
- name: unit tests
run: flutter test
- name: run tests
timeout-minutes: 30
env:
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
ALIAS: ${{ secrets.ALIAS }}
KEY_PATH: key.jks
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
profile: pixel
script: |
/Users/runner/Library/Android/sdk/tools/bin/avdmanager list
flutter pub get
flutter drive --target=test_driver/app.dart --flavor dev
27 changes: 16 additions & 11 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
name: Test
name: Analyze code and basic tests
on:
push:
branches:
- master
- develop
jobs:
build-and-test:
analyze-and-test:
name: run analyze code and basic tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: configure enviroment
uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1.4.0
java-version: '8.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.22.1'
channel: 'stable'
- run: dart .tool/env.dart
env:
API_KEY_TMDB: ${{ secrets.API_KEY_TMDB }}
- run: flutter pub get
- run: flutter analyze
- run: flutter build aot -t lib/main_dev.dart
- name: code analyze
run: flutter analyze
- name: unit tests
run: flutter test
- name: aot build
run: flutter build aot -t lib/main_dev.dart
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
.svn/
lib/config/env.dart
.fvm/
package-lock.json

# IntelliJ related
*.iml
Expand Down
80 changes: 80 additions & 0 deletions .tool/minimize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
const minify = require('@node-minify/core');
const babelMinify = require('@node-minify/babel-minify');
const cleanCSS = require('@node-minify/clean-css');
const htmlMinifier = require('@node-minify/html-minifier');
const jsonminify = require('@node-minify/jsonminify');

minify({
compressor: babelMinify,
input: 'build/web/flutter_service_worker.js',
output: 'build/web/flutter_service_worker.js',
callback: function (err, min) {
if (err) {
console.log('Error to minify flutter_service_worker.js. ', err);
}
}
});

minify({
compressor: cleanCSS,
input: 'build/web/style.css',
output: 'build/web/style.css',
callback: function (err, min) {
if (err) {
console.log('Error to minify style.css. ', err);
}
}
});

minify({
compressor: htmlMinifier,
input: 'build/web/404.html',
output: 'build/web/404.html',
callback: function (err, min) {
if (err) {
console.log('Error to minify 404.html. ', err);
}
}
});

minify({
compressor: htmlMinifier,
input: 'build/web/index.html',
output: 'build/web/index.html',
callback: function (err, min) {
if (err) {
console.log('Error to minify index.html. ', err);
}
}
});

minify({
compressor: jsonminify,
input: 'build/web/assets/assets/i18n/en.json',
output: 'build/web/assets/assets/i18n/en.json',
callback: function (err, min) {
if (err) {
console.log('Error to minify en.json. ', err);
}
}
});
minify({
compressor: jsonminify,
input: 'build/web/assets/assets/i18n/es.json',
output: 'build/web/assets/assets/i18n/es.json',
callback: function (err, min) {
if (err) {
console.log('Error to minify es.json. ', err);
}
}
});
minify({
compressor: jsonminify,
input: 'build/web/assets/assets/i18n/pt.json',
output: 'build/web/assets/assets/i18n/pt.json',
callback: function (err, min) {
if (err) {
console.log('Error to minify pt.json. ', err);
}
}
});
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.5.0](https://github.com/deandreamatias/tv-randshow/compare/v1.4.0...v1.5.0) (2020-12-26)


### Features

* Add app actions ([ca8155c](https://github.com/deandreamatias/tv-randshow/commit/ca8155cb845552ba1603bffd37aeb551cb6e45fd))
* Change icons source ([0365ccb](https://github.com/deandreamatias/tv-randshow/commit/0365ccb3ec4fb70a49505516564e79b8d4483715))
* Create privacy policy view ([f601d2d](https://github.com/deandreamatias/tv-randshow/commit/f601d2d0a83cb040c177af32157e72c1f8afac0a))
* Implement in app review ([7ef51be](https://github.com/deandreamatias/tv-randshow/commit/7ef51bed5f257e988a2456189d1b46db4110c52b))
* Remove google actions ([167c36e](https://github.com/deandreamatias/tv-randshow/commit/167c36e2f274977010d45a775dd57f4a59bd4671))
* Update plugin to support web ([4c6f754](https://github.com/deandreamatias/tv-randshow/commit/4c6f75493e1af8bbae4f35a0ce801fe152217de5))
* Update version ([5c33b37](https://github.com/deandreamatias/tv-randshow/commit/5c33b376bb3ce981feab276e57d97c2be4956fde))

## 1.4.1 - 29/10/20

- Remove google actions
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

## TV Randshow - App to choose a random TV show episode

![Analyze code and basic tests](https://github.com/deandreamatias/tv-randshow/workflows/Analyze%20code%20and%20basic%20tests/badge.svg)
![Integration test](https://github.com/deandreamatias/tv-randshow/workflows/Integration%20test/badge.svg)
[![Releases](https://img.shields.io/github/v/release/deandreamatias/tv-randshow)](https://github.com/deandreamatias/tv-randshow/releases)
[![Google Play](https://img.shields.io/badge/google--play-Google--Play-green?label=App)](https://play.google.com/store/apps/details?id=deandrea.matias.tv_randshow)
[![Paypal donate](https://img.shields.io/badge/paypal-donate-blue)](https://paypal.me/deandreamatias)
Expand Down
5 changes: 5 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} else {
keystoreProperties.setProperty('keyPassword', System.getenv('KEY_PASSWORD'));
keystoreProperties.setProperty('keyAlias', System.getenv('ALIAS'));
keystoreProperties.setProperty('storeFile', System.getenv('KEY_PATH'));
keystoreProperties.setProperty('storePassword', System.getenv('KEY_STORE_PASSWORD'));
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
Expand Down
8 changes: 7 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
android:name="io.flutter.app.FlutterApplication"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name">
<meta-data
android:name="com.google.android.actions"
android:resource="@xml/actions" />
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
Expand All @@ -27,7 +30,10 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<intent-filter
android:autoVerify="true"
tools:targetApi="m">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
Expand Down
10 changes: 10 additions & 0 deletions android/app/src/main/res/xml/actions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version ="1.0" encoding ="utf-8"?>
<actions>
<action intentName="actions.intent.OPEN_APP_FEATURE">
<fulfillment urlTemplate="https://tvrandshow.com/getRandomEpisode{?tvshow}">
<parameter-mapping
intentParameter="feature"
urlParameter="tvshow" />
</fulfillment>
</action>
</actions>
Binary file added assets/fonts/custom_icons.ttf
Binary file not shown.
Binary file removed assets/fonts/unicons.ttf
Binary file not shown.
5 changes: 5 additions & 0 deletions assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@
"rate_description": "Make your review about this app in Google Play",
"feedback_title": "Feedback",
"feedback_description": "Send a email with feedback or problem report about this app",
"privacy_title": "Privacy policy",
"privacy_description": "See page with privacy policy details",
"version": {
"title": "Version changelog",
"description": "See details of this and older versions",
"dialog_title": "Changelog",
"dialog_button": "CLOSE"
}
},
"privacy": {
"button_back": "BACK"
},
"loading": {
"title": "Choosing a random TV show",
"general_error": "Error to get episode. Please try again",
Expand Down
5 changes: 5 additions & 0 deletions assets/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@
"rate_description": "Escribe tu reseña sobre la app en la Google Play",
"feedback_title": "Enviar comentario",
"feedback_description": "Envia un email con tu opinión o problema sobre la aplicación",
"privacy_title": "Política de privacidad",
"privacy_description": "Ver detalles de la política de privacidad",
"version": {
"title": "Lista de versiones",
"description": "Vea los detalles de esta versión y anteriores",
"dialog_title": "Versiones",
"dialog_button": "CERRAR"
}
},
"privacy": {
"button_back": "VOLVER"
},
"loading": {
"title": "Eligiendo un episodio aleatorio",
"general_error": "Hubo un error al elegir el episodio. Por favor intenta de nuevo",
Expand Down
5 changes: 5 additions & 0 deletions assets/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@
"rate_description": "Escreve tua resenha da app na Google Play",
"feedback_title": "Enviar feedback",
"feedback_description": "Envia um email com a tua opinião ou problema da app",
"privacy_title": "Política de privacidade",
"privacy_description": "Ver detalhes da política de privacidade",
"version": {
"title": "Lista de versões",
"description": "Veja os detalhes desta versão e das anteriores",
"dialog_title": "Versões",
"dialog_button": "FECHAR"
}
},
"privacy": {
"button_back": "VOLTAR"
},
"loading": {
"title": "Escolhendo um episódio aleatório",
"general_error": "Ocorreu um erro ao escolher o episódio. Por favor tente novamente",
Expand Down
36 changes: 36 additions & 0 deletions assets/markdown/privacy_policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Privacy policy

Created: December 25, 2020

## Who makes TV Randshow

TV Randshow and its services are provided by Matias de Andrea in Spain

## App permissions

What follows are explanations of why TV Randshow requires certain permissions.

Full network access
View network connections
Required to send data to and receive data from the internet and to behave well if the connectivity of your device changes.

## Contacting TV Randshow

If you contact me (such as via Email), I may keep a record of your communications to help solve any issues you might be facing. I may use your email address or contact data to inform you about TV Randshow, such as letting you know about upcoming changes or improvements.

You can contact me via deandreamatias@gmail.com if you want your contact data and sent messages to be deleted.

## About TV Randshow

### Powered by

![TMDB](https://raw.githubusercontent.com/deandreamatias/tv-randshow/main/images/tmdb.svg)

### Further Resources

[Detailed list of changes](https://github.com/deandreamatias/tv-randshow/releases)
Source Code in [GitHub code repository](https://github.com/deandreamatias/tv-randshow)

Made on Spain. Matias de Andrea.
Android, Google Play and the Google Play logo are trademarks of Google Inc.
TV information and images are provided by TMDb, but we are not endorsed or certified by TMDb.com or its affiliates.
Loading

0 comments on commit ac0ad0b

Please sign in to comment.