Skip to content

Updating the version code and version name simply for GitHub Action t… #25

Updating the version code and version name simply for GitHub Action t…

Updating the version code and version name simply for GitHub Action t… #25

name: Build and Sign Release App
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle
- name: Access OPEN_WEATHER_API_KEY and MAPS_API_KEY
env:
OPEN_WEATHER_API_KEY: ${{ secrets.OPEN_WEATHER_API_KEY }}
MAPS_API_KEY: ${{ secrets.MAPS_API_KEY }}
run: |
echo OPEN_WEATHER_API_KEY=\"$OPEN_WEATHER_API_KEY\" >> ./local.properties
echo MAPS_API_KEY=\"$MAPS_API_KEY\" >> ./local.properties
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: assemble release
run: ./gradlew assembleRelease
- name: Sign Release
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.KEYSTORE }}
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.SIGNING_STORE_PASSWORD }}
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Build Artifacts
path: app/build/outputs/