Merge branch 'master' into feature/exercise-crowdsourcing

# Conflicts:
#	.github/workflows/ci.yml
#	lib/models/exercises/comment.g.dart
#	lib/models/exercises/exercise.g.dart
#	lib/models/exercises/image.g.dart
#	lib/models/measurements/measurement_entry.g.dart
#	lib/models/nutrition/ingredient_weight_unit.g.dart
#	lib/models/nutrition/log.g.dart
#	lib/models/workouts/day.g.dart
#	lib/models/workouts/session.g.dart
#	lib/models/workouts/workout_plan.g.dart
#	lib/providers/exercises.dart
#	pubspec.lock
#	pubspec.yaml
#	test/utils.dart
#	test/workout/gym_mode_screen_test.dart
This commit is contained in:
Roland Geider
2022-01-15 12:58:02 +01:00
136 changed files with 1441 additions and 335 deletions

View File

@@ -1,8 +1,8 @@
name: Google Play release
on:
push:
branches:
- 'release/*'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
deploy_android:
@@ -14,19 +14,12 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 12.x
java-version: 11.x
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Decrypt config files
run: cd ./android/fastlane/envfiles && chmod +x ./decrypt_secrets.sh && ./decrypt_secrets.sh
env:
DECRYPTKEY_PLAYSTORE: ${{ secrets.DECRYPTKEY_PLAYSTORE }}
DECRYPTKEY_PLAYSTORE_SIGNING_KEY: ${{ secrets.DECRYPTKEY_PLAYSTORE_SIGNING_KEY }}
DECRYPTKEY_PROPERTIES: ${{ secrets.DECRYPTKEY_PROPERTIES }}
ruby-version: '3'
- name: Setup Flutter
uses: subosito/flutter-action@v1
@@ -34,25 +27,65 @@ jobs:
channel: 'stable'
flutter-version: '2.5.x'
- run: dart --version
- run: flutter --version
- name: Decrypt config files
run: |
cd ./fastlane/android/envfiles
chmod +x ./decrypt_secrets.sh
./decrypt_secrets.sh
env:
DECRYPTKEY_PLAYSTORE: ${{ secrets.DECRYPTKEY_PLAYSTORE }}
DECRYPTKEY_PLAYSTORE_SIGNING_KEY: ${{ secrets.DECRYPTKEY_PLAYSTORE_SIGNING_KEY }}
DECRYPTKEY_PROPERTIES: ${{ secrets.DECRYPTKEY_PROPERTIES }}
- name: Flutter info
run: |
dart --version
flutter --version
- name: Install Flutter dependencies
run: flutter pub get
- name: Extract version information
id: get_version
run: |
echo ::set-output name=VERSION_V::$(echo $GITHUB_REF | cut -d / -f 3)
echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | cut -c 2-)
echo ::set-output name=BUILD::$(flutter pub run cider version | cut -d '+' -f 2)
# Note: the original tag that triggered the workflow is in the form vX.Y.Z
# but the pubspec.yaml is committed in the commit after that one.
# Since we need the tag to point to the correct commit for other workflows
# such as f-droid we need a way to correct it. Only moving the tag
# would not work, as it would trigger this workflow again. So as
# a workaround, we use the v-tag to trigger this workflow, add a new
# one without the v and push it.
- name: Bump version
uses: maierj/fastlane-action@v2.0.0
with:
lane: setVersion
subdirectory: android
run: |
flutter pub run cider version ${{ steps.get_version.outputs.VERSION }}+${{ steps.get_version.outputs.BUILD }}
flutter pub run cider bump build
git config user.name Github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Bump version to $( flutter pub run cider version )"
git tag ${{ steps.get_version.outputs.VERSION }}
git push origin HEAD:master --tags
git push origin --delete ${{ steps.get_version.outputs.VERSION_V }}
- name: Build AAB
run: flutter build appbundle --release
env:
WGER_API_KEY: ${{ secrets.WGER_API_KEY }}
- name: Run Fastlane
uses: maierj/fastlane-action@v2.0.0
- name: Upload build to Play Store
uses: maierj/fastlane-action@v2.1.0
with:
lane: production
subdirectory: android
- name: Make Github release
uses: softprops/action-gh-release@v1
with:
files: build/app/outputs/bundle/release/app-release.aab
tag_name: ${{ steps.get_version.outputs.VERSION }}
body_path: CHANGELOG.md

View File

@@ -1,6 +1,13 @@
name: Continous Integration
on: [pull_request, push]
on:
push:
branches: [ pull_request, master ]
paths:
- '**.dart'
pull_request:
branches: [ pull_request, master ]
paths:
- '**.dart'
jobs:
test:
runs-on: ubuntu-20.04

View File

@@ -4,6 +4,8 @@ on:
push:
branches:
- "master"
paths:
- '**.dart'
jobs: