Skip to content

Commit

Permalink
Merge pull request #14 from mahdikhashan/fix-ci-issue
Browse files Browse the repository at this point in the history
Fix ci issue
  • Loading branch information
mahdikhashan authored Dec 25, 2023
2 parents 7ba9f04 + 3fda7c4 commit 216bfd7
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
description: 'Application version'
required: true
default: '0.1'

jobs:
build:
name: Build Signed APK
Expand All @@ -26,7 +27,7 @@ jobs:
- name: Grant execute permission for gradlew
run: chmod +x gradlew

# Here we need to decode keystore.jks from base64 string and place it
# Decode keystore.jks from base64 string and place it
# in the folder specified in the release signing configuration
- name: Decode Keystore
id: decode_keystore
Expand Down Expand Up @@ -54,14 +55,16 @@ jobs:
# Show information about the APK's signing certificates
- name: Verify Signature
run: |
$ANDROID_SDK_ROOT/build-tools/33.0.1/apksigner verify --print-certs app/build/outputs/apk/release/${APP_NAME}_${{ github.event.inputs.version }}.apk
APK_PATH="app/build/outputs/apk/release/${APP_NAME}_${{ github.event.inputs.version }}.apk"
echo "Verifying APK at path: $APK_PATH"
$ANDROID_SDK_ROOT/build-tools/33.0.1/apksigner verify --print-certs "$APK_PATH"
# Save the APK after the Build job is complete to publish it as a Github release in the next job
- name: Upload APK
uses: actions/[email protected]
with:
name: "${APP_NAME}"
path: app/build/outputs/apk/release/${APP_NAME}_${{ github.event.inputs.version }}.apk
path: "app/build/outputs/apk/release/${APP_NAME}_${{ github.event.inputs.version }}.apk"

release:
name: Release APK
Expand All @@ -72,16 +75,16 @@ jobs:
- name: Download APK from build
uses: actions/download-artifact@v1
with:
name: ${APP_NAME}
name: "${APP_NAME}"

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.event.inputs.version }}
name: Release v${{ github.event.inputs.version }}
tag_name: "v${{ github.event.inputs.version }}"
name: "Release v${{ github.event.inputs.version }}"
draft: false
prerelease: false
files: ${APP_NAME}/${APP_NAME}_${{ github.event.inputs.version }}.apk
files: "${APP_NAME}/${APP_NAME}_${{ github.event.inputs.version }}.apk"

0 comments on commit 216bfd7

Please sign in to comment.