Feat: Bump target SDK and billing library (#27) #174
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: build | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "README.md" | |
- "settings.json" | |
- "flags.json" | |
- "art/**" | |
pull_request: | |
paths-ignore: | |
- "README.md" | |
- "settings.json" | |
- "flags.json" | |
- "art/**" | |
jobs: | |
buildJob: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- run: chmod +x gradlew | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/vpn/build | |
key: ${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Creating required files | |
run: | | |
echo "$SIGNING_KEY" > key.jks.base64 | |
echo "$PLAY_CONFIG" > play_config.json.base64 | |
echo "$GOOGLE_SERVICES_JSON" > play.json.base64 | |
base64 -d -i key.jks.base64 > key.jks | |
base64 -d -i play_config.json.base64 > play_config.json | |
base64 -d -i play.json.base64 > "${{github.workspace}}/app/google-services.json" | |
echo "signing.alias=$ALIAS" >> local.properties | |
echo "signing.storePassword=$STORE_PASSWORD" >> local.properties | |
echo "signing.keyPassword=$KEY_PASSWORD" >> local.properties | |
echo "signing.keyFile=${{github.workspace}}/key.jks" >> local.properties | |
echo "gear.api=$GEAR_API" >> local.properties | |
echo "gear.api2=$GEAR_API2" >> local.properties | |
echo "gear.key=$GEAR_KEY" >> local.properties | |
echo "gear.host=$GEAR_HOST" >> local.properties | |
echo "gear.secret.duo=$GEAR_DUO_SECRET" >> local.properties | |
env: | |
SIGNING_KEY: ${{secrets.SIGNING_KEY}} | |
PLAY_CONFIG: ${{secrets.PLAY_CONFIG}} | |
ALIAS: ${{secrets.ALIAS}} | |
STORE_PASSWORD: ${{secrets.STORE_PASSWORD}} | |
KEY_PASSWORD: ${{secrets.KEY_PASSWORD}} | |
GOOGLE_SERVICES_JSON: ${{secrets.GOOGLE_SERVICES_JSON}} | |
GEAR_DUO_SECRET: ${{secrets.GEAR_DUO_SECRET}} | |
GEAR_API: ${{secrets.GEAR_API}} | |
GEAR_API2: ${{secrets.GEAR_API2}} | |
GEAR_KEY: ${{secrets.GEAR_KEY}} | |
GEAR_HOST: ${{secrets.GEAR_HOST}} | |
- name: Assemble & Sign | |
run: | | |
./gradlew app:assembleRelease --stacktrace --scan | |
- name: Creating some output variables | |
id: vars | |
run: echo "::set-output name=sha_short::$(echo ${{ github.sha }} | cut -c -7)" | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: GearVPN.apk-snapshot-${{ steps.vars.outputs.sha_short }} | |
path: app/build/outputs/apk/release |