Skip to content

Commit

Permalink
Merge branch 'release/2.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
deandreamatias committed Jul 13, 2024
2 parents 42294d7 + 24cdf17 commit bef2fcf
Show file tree
Hide file tree
Showing 105 changed files with 905 additions and 379 deletions.
4 changes: 4 additions & 0 deletions .env/dev.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"API_KEY": "YOUR_TMDB_API_KEY",
"STREAMING_API_KEY": "YOUR_STREAM_API_KEY"
}
4 changes: 0 additions & 4 deletions .fvm/fvm_config.json

This file was deleted.

3 changes: 3 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"flutter": "3.22.2"
}
48 changes: 48 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build and test
on:
push:

jobs:
build:
name: Build and test
runs-on: macos-latest

steps:
- name: Get repository
uses: actions/checkout@v4

- name: Configure enviroment
env:
ENV_PROD_BASE64: ${{ secrets.ENV_PROD_BASE64 }}
ENV_DEV_BASE64: ${{ secrets.ENV_DEV_BASE64 }}
run: |
echo $ENV_PROD_BASE64 | base64 --decode > .env/prod.json
echo $ENV_DEV_BASE64 | base64 --decode > .env/dev.json
- name: Get flutter version
uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
with:
path: '.fvmrc'
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
cache: true
cache-key: 'flutter-:os:-:version:-:arch:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'

- name: Show flutter info
run: flutter doctor

- name: Install dependencies
run: sh tool/setup.sh

- name: Verify formated files
run: dart format $(find . -name "*.dart" -not -wholename "**/*.g.dart") --set-exit-if-changed

- name: Analyze code
run: flutter analyze

- name: Test
run: sh tool/unit-test.sh prod
142 changes: 142 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Release
on:
push:

jobs:
build:
name: Build
runs-on: macos-latest

steps:
- name: Get repository
uses: actions/checkout@v4
- name: Configure enviroment
env:
ENV_PROD_BASE64: ${{ secrets.ENV_PROD_BASE64 }}
ENV_DEV_BASE64: ${{ secrets.ENV_DEV_BASE64 }}
run: |
echo $ENV_PROD_BASE64 | base64 --decode > .env/prod.json
echo $ENV_DEV_BASE64 | base64 --decode > .env/dev.json
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '18'
cache: 'gradle'

- name: Get Flutter version
uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
with:
path: '.fvmrc'
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
cache: true
cache-key: 'flutter-:os:-:version:'
cache-path: '${{ runner.tool_cache }}/flutter/:os:-:version:'

- name: Show Flutter info
run: flutter doctor

- name: Install dependencies
run: sh tool/setup.sh

- name: Get Android keystore secrets
env:
PLAY_STORE_UPLOAD_KEY: ${{ secrets.PLAY_STORE_UPLOAD_KEY }}
PLAY_STORE_UPLOAD_KEY_PROPERTIES: ${{ secrets.PLAY_STORE_UPLOAD_KEY_PROPERTIES }}
run: |
echo $PLAY_STORE_UPLOAD_KEY | base64 -d > android/key.jks
echo $PLAY_STORE_UPLOAD_KEY_PROPERTIES | base64 -d > android/key.properties
- name: Build Android prod
run: sh tool/build-android.sh prod appbundle

- name: Archive appbundle
uses: actions/upload-artifact@v4
with:
name: appbundle
path: build/app/outputs/bundle/prodRelease/app-prod-release.aab
retention-days: 1
overwrite: true

- name: Build Web prod
run: sh tool/build-web.sh prod
- name: Archive web
uses: actions/upload-artifact@v4
with:
name: web-app
path: build/web/
retention-days: 1

upload-play-store:
if: ${{ github.ref_type == 'tag' }}
name: Upload appbundle
runs-on: macos-latest
needs: build
steps:
- name: Download appbundle
uses: actions/download-artifact@v4
with:
name: appbundle
path: build/app/outputs/bundle/prodRelease/
- name: Upload Android Release to Play Store
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_API_KEY }}
packageName: deandrea.matias.tv_randshow
releaseFiles: build/app/outputs/bundle/prodRelease/app-prod-release.aab
track: internal

deployment-web-preview:
if: ${{ github.ref == 'refs/heads/main' }}
needs: build
name: Deploy web
runs-on: ubuntu-latest
steps:
- name: Configure enviroment
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: web-app
path: build/web
- name: HTML/CSS/JS Minifier
uses: docker://devatherock/minify-js:2.0.0
with:
directory: 'build/web'
add_suffix: false
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TV_RANDSHOW }}'
projectId: tv-randshow
channelId: preview

deployment-web:
if: ${{ github.ref_type == 'tag' }}
needs: build
name: Deploy web
runs-on: ubuntu-latest
steps:
- name: Configure enviroment
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: web-app
path: build/web
- name: HTML/CSS/JS Minifier
uses: docker://devatherock/minify-js:2.0.0
with:
directory: 'build/web'
add_suffix: false
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TV_RANDSHOW }}'
projectId: tv-randshow
channelId: live
- name: Release
uses: softprops/action-gh-release@v2
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
Expand All @@ -9,8 +8,10 @@
.buildlog/
.history
.svn/
.fvm/flutter_sdk
package-lock.json
.env/dev.json
.env/prod.json
*.zip

# IntelliJ related
*.iml
Expand Down Expand Up @@ -50,14 +51,17 @@ linked_*.ds
unlinked.ds
unlinked_spec.ds
.flutter-plugins-dependencies
lib/generated_plugin_registrant.dart
*.g.dart
*.config.dart
*.mocks.dart
pubspec.lock

### Firebase ###
**/node_modules/*
**/.firebaserc
.runtimeconfig.json
.firebase/
**/web/.well-known/

# FVM Version Cache
.fvm/
80 changes: 0 additions & 80 deletions .tool/minimize.js

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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.

## [2.2.0](https://github.com/deandreamatias/tv-randshow/compare/v2.1.0...v2.2.0) (2024-07-13)

* Update Android icon
* Update dependencies
* Build with Flutter 3.22.2

## [2.1.0](https://github.com/deandreamatias/tv-randshow/compare/v2.0.0...v2.1.0) (2024-01-06)

* Update dependencies
Expand Down
Loading

0 comments on commit bef2fcf

Please sign in to comment.