Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
IndusAryan committed Jul 15, 2024
2 parents 2ea7c9b + 184b3ca commit 7436b42
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 18 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,30 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.6.0
- uses: actions/checkout@v4

- name: Setup JAVA 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Cache Gradle and wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}

- name: Debug Base64 String
run: |
echo "${{ secrets.SIGNING_KEY_STORE_BASE64 }}"
echo "${{ secrets.SIGNING_KEY_STORE_BASE64 }}"
- name: Decode Keystore
run: |
echo "${{ secrets.SIGNING_KEY_STORE_BASE64 }}" | base64 --decode > "${{ secrets.SIGNING_KEY_STORE_PATH }}"
ls -l ${{ secrets.SIGNING_KEY_STORE_PATH }}
echo "${{ secrets.SIGNING_KEY_STORE_BASE64 }}" | base64 --decode > /home/runner/keystore.jks
chmod 600 /home/runner/keystore.jks
ls -l /home/runner/keystore.jks
- name: Build Release apk
env:
SIGNING_KEY_STORE_PATH: ${{ secrets.SIGNING_KEY_STORE_PATH }}
SIGNING_KEY_STORE_PATH: /home/runner/keystore.jks
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
Expand All @@ -49,16 +41,32 @@ jobs:
run: ls -R app/build/outputs/apk/release/

- name: Upload Release Build to Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release-artifacts
paths: |
path: |
app/build/outputs/apk/release/
- name: Read version name from build.gradle.kts
id: read_version
run: |
VERSION_NAME=$(grep 'versionName' app/build.gradle.kts | sed 's/.*versionName\s*=\s*"\(.*\)"/\1/')
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
echo "::set-output name=VERSION_NAME::$VERSION_NAME"
- name: Create a tag
id: create_tag
run: |
TAG_NAME="v${{ steps.read_version.outputs.VERSION_NAME }}"
echo "::set-output name=TAG_NAME::$TAG_NAME"
git tag $TAG_NAME
git push origin $TAG_NAME
- name: Create Github Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
prerelease: false
tag_name: ${{ steps.create_tag.outputs.TAG_NAME }}
files: |
app/build/outputs/apk/release/app-universal-release.apk
6 changes: 5 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ plugins {
kotlin("plugin.serialization") version "1.9.22"
}

/*val tmpFilePath = System.getProperty("user.home") + "/work/_temp/keystore/"
val releaseStoreFile: File? = File(tmpFilePath).listFiles()?.first()*/

android {
namespace = "com.aryan.veena"
compileSdk = 34
Expand All @@ -21,7 +24,8 @@ android {

signingConfigs {
create("release") {
storeFile = file("/home/runner/work/Veena/Veena/keystore.jks" ?: "keystore.jks")
//storeFile = releaseStoreFile?.let { file(it) }
storeFile = file(System.getenv("SIGNING_KEY_STORE_PATH") ?: "/home/runner/keystore.jks")
storePassword = System.getenv("SIGNING_STORE_PASSWORD")
keyAlias = System.getenv("SIGNING_KEY_ALIAS")
keyPassword = System.getenv("SIGNING_KEY_PASSWORD")
Expand Down

0 comments on commit 7436b42

Please sign in to comment.