-
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53c3258
commit cd10c54
Showing
7 changed files
with
76 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Generated APK | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set Up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' # See 'Supported distributions' for available options | ||
java-version: '17' | ||
cache: 'gradle' | ||
|
||
- name: Change wrapper permissions | ||
run: chmod +x ./gradlew | ||
|
||
# Create APK Release | ||
- name: Build apk | ||
run: | | ||
ANDROID_STORE_PASSWORD=${{ secrets.ANDROID_STORE_PASSWORD }} | ||
ANDROID_KEY_PASSWORD=${{ secrets.ANDROID_KEY_PASSWORD }} | ||
bash build-apk.sh | ||
# Upload Artifact Build | ||
- name: Upload APK | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: plain-app | ||
path: /app/build/outputs/apk/free/release/app/ |
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
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
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
function err_and_exit() | ||
{ | ||
echo "$1" >&2 | ||
exit 1 | ||
} | ||
|
||
function getVersionName() | ||
{ | ||
echo $(grep versionName ./app/build.gradle.kts | awk -F '"' '{print $2}') | ||
} | ||
|
||
cat > ./keystore.properties <<EOF | ||
storePassword=$ANDROID_STORE_PASSWORD | ||
keyPassword=$ANDROID_KEY_PASSWORD | ||
keyAlias=plain | ||
storeFile=release.jks | ||
EOF | ||
|
||
cat > ./local.properties <<EOF | ||
sdk.dir=/Users/$USER/Library/Android/sdk | ||
EOF | ||
|
||
echo "Build PlainApp-$(getVersionName).apk..." | ||
|
||
./gradlew assembleFreeRelease || err_and_exit "build failed" | ||
|
||
echo "Copying apk file..." | ||
|
||
BUILD_FILE="PlainApp-$(getVersionName).apk" | ||
|
||
mv ./app/build/outputs/apk/free/release/app-free-release.apk ./app/build/outputs/apk/free/release/$BUILD_FILE |