Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesvedder committed Jan 27, 2024
1 parent b41d127 commit 67621f9
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 60 deletions.
85 changes: 29 additions & 56 deletions .github/workflows/deploy-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,70 +33,50 @@ jobs:
with:
fetch-depth: 0
- name: Set up ruby env
run: |
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y ruby-full
gem install bundler
# bundle config set path 'vendor/bundle'
bundle install
bundle exec fastlane
working-directory: ./app/android
#uses: ruby/setup-ruby@v1
#with:
#ruby-version: head
#bundler-cache: true
#working-directory: ./app/android
# run: |
# sudo apt-get update
# sudo snap install ruby --classic
# bundle install
# working-directory: ./app/android
uses: ruby/setup-ruby@v1
with:
ruby-version: head # 3.3 # head
bundler-cache: true
working-directory: ./app/android
- name: Set up flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
architecture: x64 # optional, x64 or arm64
- name: Cache flutter version
run: |
flutter_version=$(flutter --version)
flutter_version_hash=$(flutter --version | sha256sum | awk '{print $1}')
echo "Flutter version: $flutter_version"
echo "Flutter version hash: $flutter_version_hash"
echo "flutter_version_hash=$flutter_version_hash" >> $GITHUB_ENV
- name: Restore StudyU app bundle cache
id: cache-studyu-app-bundle-restore
uses: actions/cache/restore@v4
with:
path: app/build/app/outputs/bundle/release/app-release.aab
key: flutter_v${{ env.flutter_version_hash }}-${{ hashFiles('**/pubspec.lock') }}-${{ runner.os }}
restore-keys: |
flutter_v${{ env.flutter_version_hash }}-${{ hashFiles('**/pubspec.lock') }}-
- run: |
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
echo "export LC_ALL=en_US.UTF-8" >> $HOME/.profile
echo "export LANG=en_US.UTF-8" >> $HOME/.profile
source $HOME/.profile
# ls "/home/runner/work/studyu/studyu/app/android/vendor/bundle/ruby/3.4.0+0/bin"
# echo "----------------"
# ls "/home/runner/work/studyu/studyu/app/android/vendor/bundle/ruby/3.4.0+0/gems"
# echo "----------------"
# ls
# echo "----------------"
# bundle config
# echo "----------------"
# gem list
bundle check
bundle install
ruby --version
bundle update fastlane
bundle check
bundle exec fastlane
- name: Decrypt files
id: decrypt_files
run: |
echo "${{ secrets.STUDYU_ANDROID_KEYSTORE }}" > keystore.jks.asc
gpg -d --passphrase "${{ secrets.STUDYU_ANDROID_KEYSTORE_PASSWORD }}" --batch keystore.jks.asc > app/android/app/studyu-keystore.jks
echo "${{ secrets.STUDYU_KEY_PROPERTIES}}" > app/android/key.properties
cd app/android/
# bundle install
bundle exec fastlane actions
echo "----------------"
bundle exec gem list
working-directory: ./app/android
# working-directory: ./app
# - name: Restore StudyU app bundle cache
# id: cache-studyu-app-bundle-restore
# uses: actions/cache/restore@v4
# with:
# path: app/build/app/outputs/bundle/release/app-release.aab
# todo key also needs to involve decrypted files
# key: flutter_v${{ env.flutter_version_hash }}-${{ hashFiles('**/pubspec.lock') }}-${{ runner.os }}
# restore-keys: |
# flutter_v${{ env.flutter_version_hash }}-${{ hashFiles('**/pubspec.lock') }}-
- name: Build StudyU app bundle
if: steps.cache-studyu-app-bundle-restore.outputs.cache-hit != 'true'
# todo add --release
run: |
flutter build appbundle --release --build-number ${{ github.run_number }}
working-directory: ./app
Expand All @@ -106,13 +86,6 @@ jobs:
with:
path: app/build/app/outputs/bundle/release/app-release.aab
key: ${{ steps.cache-studyu-app-bundle-restore.outputs.cache-primary-key }}
- name: Decrypt files
id: decrypt_files
# todo where are these files used?
run: |
echo "${{ secrets.STUDYU_ANDROID_KEYSTORE }}" > keystore.jks.asc
gpg -d --passphrase "${{ secrets.STUDYU_ANDROID_KEYSTORE_PASSWORD }}" --batch keystore.jks.asc > app/android/studyu-keystore.jks
echo "${{ secrets.STUDYU_KEY_PROPERTIES}}" > app/android/key.properties
- name: Fastlane upload
run: bundle exec fastlane deploy_internal
working-directory: ./app/android
Expand Down
2 changes: 1 addition & 1 deletion app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ android {
}

// Signing with the debug keys, so `flutter run --release` works.
signingConfig signingConfigs.debug
// signingConfig signingConfigs.debug
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions app/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ buildscript {
}

dependencies {
// Start flutter_local_notifications
// classpath 'com.android.tools.build:gradle:7.3.1'
// End flutter_local_notifications
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down

0 comments on commit 67621f9

Please sign in to comment.