keyprops #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Distribution | |
on: #events (push and pull_request) | |
push: | |
branches: [ "main" ] | |
#pull_request: | |
# branches: [ "main" ] | |
env: | |
PROPERTIES_PATH: "android/key.properties" | |
jobs: #here we specify the jobs - We could have multiple jobs | |
build: #name it something meaningful | |
runs-on: macos-latest #runner: select a machine to use | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '17.x' | |
- uses: subosito/flutter-action@v1 | |
with: | |
channel: 'stable' | |
- name: Install dependencies | |
run: flutter pub get # action | |
- name: Run clean | |
run: flutter clean | |
- name: Upload-keystore generator | |
run: | | |
echo "${{secrets.UPLOAD_KEYSTORE}}" > upload.keystore.asc | |
base64 -d --input upload.keystore.asc --output android/app/key.jks | |
- name: Key.Properties | |
run: | | |
echo keyPassword=\${{ secrets.UPLOAD_KEYSTORE_PASSPHRASE }} > ${{env.PROPERTIES_PATH}} | |
echo storePassword=\${{ secrets.UPLOAD_KEYSTORE_PASSPHRASE }} >> ${{env.PROPERTIES_PATH}} | |
echo keyAlias=\${{ secrets.ALIAS }} >> ${{env.PROPERTIES_PATH}} | |
#- name: Run tests | |
# run: flutter test | |
- name: Build Android appBundle | |
run: flutter build appbundle --release --verbose | |
#- name: Build ios | |
# run: flutter build ios --release --no-codesign | |
- name: Sign AAB | |
id: sign | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: build/app/outputs/bundle/release/app-release.aab | |
signingKeyBase64: ${{ secrets.UPLOAD_KEYSTORE }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.UPLOAD_KEYSTORE_PASSPHRASE }} | |
keyPassword: ${{ secrets.UPLOAD_KEYSTORE_PASSPHRASE }} | |
- name: Upload AAB | |
id: uploadArtifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: waves-android | |
path: build/app/outputs/bundle/release/app-release.aab | |
- name: Create service_account.json | |
id: createServiceAccount | |
run: echo '${{ secrets.CREDENTIAL_FILE_CONTENT }}' > service_account.json | |
- name: Deploy to Play Store (BETA) | |
id: deploy | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJson: service_account.json | |
packageName: com.ecency.waves | |
releaseFile: build/app/outputs/bundle/release/app-release.aab | |
track: alpha | |
#- name: Upload artifact to Firebase App Distribution | |
# uses: wzieba/Firebase-Distribution-Github-Action@v1 | |
# with: | |
# appId: ${{secrets.FIREBASE_APP_ID}} | |
# serviceCredentialsFileContent: ${{ secrets.CREDENTIAL_FILE_CONTENT }} | |
# groups: testers | |
# file: build/app/outputs/bundle/release/app-release.aab |