Skip to content

Delete .github/workflows/android-ci.yml #27

Delete .github/workflows/android-ci.yml

Delete .github/workflows/android-ci.yml #27

Workflow file for this run

name: Build and Release APK
on:
push:
branches:
- master # Change this to your main branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Regenerate Keystore
run: |
keytool -genkey -v -keystore /home/runner/work/reactmap-android/reactmap-android/keystore.jks \
-keyalg RSA -keysize 2048 -validity 10000 -alias ${{ secrets.KEY_ALIAS }} \
-storepass ${{ secrets.KEYSTORE_PASSWORD }} -keypass ${{ secrets.KEY_PASSWORD }} \
-dname "CN=Aco, OU=Pogofuerth, O=Pogofuerth, L=DE, ST=BY, C=DE"
- name: Check if keystore is available
run: ls -a /home/runner/work/reactmap-android/reactmap-android/keystore.jks
- name: Make Gradlew executable
run: chmod +x ./gradlew
- name: Extract versionName from gradle.properties
id: extract_version
run: echo "::set-output name=version::$(grep 'reactmap.versionName' gradle.properties | cut -d'=' -f2 | tr -d '[:space:]')"
- name: Build with Gradle
run: ./gradlew assembleRelease
- name: Sign APK and create release
run: |
cd /home/runner/work/reactmap-android/reactmap-android/
./gradlew assembleRelease -Pandroid.injected.signing.store.file=/home/runner/work/reactmap-android/reactmap-android/keystore.jks -Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} -Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} -Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }}
- name: List APK directory - apk
run: ls -R /home/runner/work/reactmap-android/reactmap-android/app/build/outputs/apk/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Reactmap-android
path: /home/runner/work/reactmap-android/reactmap-android/app/build/outputs/apk/release/app-release.apk
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.extract_version.outputs.version }}
release_name: Release v${{ steps.extract_version.outputs.version }}
draft: false
prerelease: false
- name: Upload Artifact
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /home/runner/work/reactmap-android/reactmap-android/app/build/outputs/apk/release/app-release.apk
asset_name: pogofuerth-v${{ steps.extract_version.outputs.version }}.apk
asset_content_type: application/octet-stream