Skip to content

Commit

Permalink
Update release-apk.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Mar 22, 2023
1 parent 989cc3c commit 8b43a9e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/release-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ jobs:
- name: sign-apk
id: signapk
run: |
DATE=`date +'%Y%m%d'`
SHA_SHORT=`git rev-parse --short HEAD`
UNSIGNED_APK=`find app/build/outputs/apk/release -type f -name "*-release-unsigned.apk" | head -n 1`
ALIGNED_APK=${UNSIGNED_APK//-release-unsigned.apk/-release-unsigned-aligned.apk}
SIGNED_APK=${UNSIGNED_APK//-release-unsigned.apk/-release.apk}
SIGNED_APK=${{ github.event.repository.name }}-${DATE}.${SHA_SHORT}.apk
keytool -genkey -noprompt -alias ncnn \
-dname "CN=mqttserver.ibm.com, OU=ID, O=IBM, L=Hursley, S=Hants, C=GB"\
-keystore ncnn.keystore -storepass 7767517 -keypass 7767517 \
Expand All @@ -50,11 +52,12 @@ jobs:
--ks-pass pass:7767517 --key-pass pass:7767517 --out ${SIGNED_APK} ${SIGNED_APK}
${ANDROID_HOME}/build-tools/29.0.2/apksigner verify ${SIGNED_APK}
echo "SIGNED_APK=${SIGNED_APK}" >> $GITHUB_OUTPUT
echo "APK_VERSION=${DATE}.${SHA_SHORT}" >> $GITHUB_OUTPUT
- name: create-release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
tag_name: ${{ steps.signapk.outputs.APK_VERSION }}
name: Release ${{ steps.signapk.outputs.APK_VERSION }}
files: ${{ steps.signapk.outputs.SIGNED_APK }}

0 comments on commit 8b43a9e

Please sign in to comment.