-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from mahdikhashan/fix-ci-issue
Fix ci issue
- Loading branch information
Showing
1 changed file
with
10 additions
and
7 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 |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
description: 'Application version' | ||
required: true | ||
default: '0.1' | ||
|
||
jobs: | ||
build: | ||
name: Build Signed APK | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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" |