Skip to content

Gsoc 2023 migrating ballot list fragment to compose (#52) #68

Gsoc 2023 migrating ballot list fragment to compose (#52)

Gsoc 2023 migrating ballot list fragment to compose (#52) #68

Workflow file for this run

name: Android Build
on:
pull_request:
branches:
- '*'
push:
branches:
- '*'
env:
FB_API_KEY: ${{ secrets.FB_API_KEY }}
FB_API_SCHEME: ${{ secrets.FB_API_SCHEME }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
SERVER_KEY: ${{ secrets.SERVER_KEY }}
FIREBASE_JSON: ${{ secrets.FIREBASE_JSON }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEYSTORE: ${{ secrets.KEYSTORE }}
APPETIZE_API: ${{ secrets.APPETIZE_API }}
jobs:
lintDebug:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: set up JDK 19
uses: actions/setup-java@v1
with:
java-version: 19
- name: Save local.properties
run: |
echo "fbApiKey=$FB_API_KEY" > local.properties
echo "fbApiScheme=$FB_API_SCHEME" >> local.properties
echo "secretKey=$SECRET_KEY" >> local.properties
echo "serverKey=$SERVER_KEY" >> local.properties
- name: Save google-services.json
run: |
echo "$FIREBASE_JSON" > app/google-services.json
- name: Save signing.properties
run: |
echo "storeFile=keystore.jks" > signing.properties
echo "storePassword=$KEYSTORE_PASSWORD" >> signing.properties
echo "keyAlias=$KEY_ALIAS" >> signing.properties
echo "keyPassword=$KEY_PASSWORD" >> signing.properties
- name: Save keystore.jks
run: |
echo "$KEYSTORE" | base64 --decode > app/keystore.jks
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Install Fastlane
run: gem install fastlane
- name: Install dependencies
run: |
sudo apt-get install -y build-essential dh-autoreconf
gem install bundler:1.17.2
bundle install
- name: Run lint
run: |
fastlane lint
assembleRelease:
needs: [lintDebug]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: set up JDK 19
uses: actions/setup-java@v1
with:
java-version: 19
- name: Save local.properties
run: |
echo "fbApiKey=$FB_API_KEY" > local.properties
echo "fbApiScheme=$FB_API_SCHEME" >> local.properties
echo "secretKey=$SECRET_KEY" >> local.properties
echo "serverKey=$SERVER_KEY" >> local.properties
- name: Save google-services.json
run: |
echo "$FIREBASE_JSON" > app/google-services.json
- name: Save signing.properties
run: |
echo "storeFile=keystore.jks" > signing.properties
echo "storePassword=$KEYSTORE_PASSWORD" >> signing.properties
echo "keyAlias=$KEY_ALIAS" >> signing.properties
echo "keyPassword=$KEY_PASSWORD" >> signing.properties
- name: Save keystore.jks
run: |
echo "$KEYSTORE" | base64 --decode > app/keystore.jks
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Install Fastlane
run: gem install fastlane
- name: Install dependencies
run: |
sudo apt-get install -y build-essential dh-autoreconf
gem install bundler:1.17.2
bundle install
- name: Build apk release project
run: |
fastlane build_release
- name: Upload APK Release
uses: actions/upload-artifact@v3
with:
name: app-release
path: app/build/outputs/apk/release/app-release.apk
debugTests:
needs: [assembleRelease]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: set up JDK 19
uses: actions/setup-java@v1
with:
java-version: 19
- name: Save local.properties
run: |
echo "fbApiKey=$FB_API_KEY" > local.properties
echo "fbApiScheme=$FB_API_SCHEME" >> local.properties
echo "secretKey=$SECRET_KEY" >> local.properties
echo "serverKey=$SERVER_KEY" >> local.properties
- name: Save google-services.json
run: |
echo "$FIREBASE_JSON" > app/google-services.json
- name: Save signing.properties
run: |
echo "storeFile=keystore.jks" > signing.properties
echo "storePassword=$KEYSTORE_PASSWORD" >> signing.properties
echo "keyAlias=$KEY_ALIAS" >> signing.properties
echo "keyPassword=$KEY_PASSWORD" >> signing.properties
- name: Save keystore.jks
run: |
echo "$KEYSTORE" | base64 --decode > app/keystore.jks
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Install Fastlane
run: gem install fastlane
- name: Install dependencies
run: |
sudo apt-get install -y build-essential dh-autoreconf
gem install bundler:1.17.2
bundle install
- name: Run tests
run: |
fastlane test
deploy:
needs: [debugTests]
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: app-release
path: app/build/outputs/apk/release/
- name: Upload App to Appetize
run: |
curl "https://[email protected]/v1/apps" \
-F "file=@app/build/outputs/apk/release/app-release.apk" \
-F "platform=android"