modified: .github/workflows/main.yml

This commit is contained in:
stonegate 2020-05-19 14:36:40 +08:00
parent 23a952ad15
commit c6978bf2eb
2 changed files with 11 additions and 9 deletions

View File

@ -28,7 +28,11 @@ jobs:
with: with:
flutter-version: '1.18.0-11.1.pre' flutter-version: '1.18.0-11.1.pre'
channel: 'beta' channel: 'beta'
env:
KEY_AILAS: ${{ secrets.KEY_ALIAS}}
KEY_PASSWORD: ${{ secrets.ALIAS_PASSWORD }}
ALIAS_PASSWORD: ${{ secrets.KEY_PASSWORD }}
ENCODED_KEYSTORE: ${{ secrets.ENCODED_KEYSTORE }}
# Runs a single command using the runners shell # Runs a single command using the runners shell
- name: Run flutter doctor - name: Run flutter doctor
run: flutter doctor run: flutter doctor
@ -39,14 +43,12 @@ jobs:
- name: Configure env - name: Configure env
run: | run: |
echo $ENCODED_KEYSTORE | base64 -di > /home/runner/work/tsacdop/tsacdop/android/app/keystore.jks echo $ENCODED_KEYSTORE | base64 -di > /home/runner/work/tsacdop/tsacdop/android/app/keystore.jks
export KEYSTORE=${HOME}/keystore.jks
dart tool/env.dart dart tool/env.dart
- name: Build android version - name: Build android version
run: flutter build appbundle --no-shrink run: flutter build appbundle --no-shrink
- name: Create a Release APK - uses: actions/upload-artifact@v1
uses: ncipollo/release-action@v1
with: with:
artifacts: "build/app/outputs/apk/debug/*.apk" name: release-apk
token: ${{ secrets.TOKEN }} path: build/app/outputs/bundle/release/app-release.aab

View File

@ -57,9 +57,9 @@ android {
signingConfigs { signingConfigs {
release { release {
storeFile file(System.getenv("KEYSTORE") ?: "keystore.jks") storeFile file(System.getenv("KEYSTORE") ?: "keystore.jks")
storePassword System.getenv("secrets.KEYSTORE_PASSWORD") storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias System.getenv("secrets.KEY_ALIAS") keyAlias System.getenv("KEY_ALIAS")
keyPassword System.getenv("secrets.KEY_PASSWORD") keyPassword System.getenv("KEY_PASSWORD")
// keyAlias keystoreProperties['keyAlias'] // keyAlias keystoreProperties['keyAlias']
// keyPassword keystoreProperties['keyPassword'] // keyPassword keystoreProperties['keyPassword']
// storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null // storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null