Skip to content

Commit

Permalink
Fix nightly GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
micahlt committed Mar 7, 2024
1 parent 904d4b6 commit b97e433
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 20 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/android-debug.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Generate Android Development APK
name: Nightly debug build

on: [push, pull_request]

jobs:
apk_gen:
name: Generate debug app
name: Generate debug APK
runs-on: ubuntu-latest
steps:
- name: Get code from the current repository
Expand All @@ -16,36 +16,37 @@ jobs:
run: >
git config --global url."https://github.com/".insteadOf
ssh://git@github.com/
- name: Install Java
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: adopt
cache: gradle

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Install Android SDK
uses: android-actions/setup-android@v2

- name: Install Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install app dependencies
run: npm install

- name: Convert Windows line endings to Linux from the gradlew file
run: sudo apt update && sudo apt install dos2unix && cd android && dos2unix ./gradlew && cd ..

- name: Make ./gradlew command executable
run: cd android && chmod +x ./gradlew && cd ..

- name: Build React Native assets
run: npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

- name: Generate APK
run: cd android && ./gradlew assembleDebug && cd ..
run: cd android && ./gradlew assembleDebug

- name: Upload generated APK to Github
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
with:
name: offsides-nightly
path: android/app/build/outputs/apk/debug/app-debug.apk
retention-days: 7
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ android {
applicationId "com.micahlindley.offsides"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 7
versionName "0.3.1"
versionCode 8
versionName "0.3.3"
}
signingConfigs {
debug {
Expand Down
Binary file modified android/app/release/app-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions android/app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 7,
"versionName": "0.3.1",
"versionCode": 8,
"versionName": "0.3.3",
"outputFile": "app-release.apk"
}
],
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "offsides",
"version": "0.3.1",
"version": "0.3.3",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down

0 comments on commit b97e433

Please sign in to comment.