Skip to content

2.3.1

2.3.1 #185

Workflow file for this run

on: [push, pull_request]
name: Build
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 17
- run: |
git clone https://github.com/UnifiedPush/android-example example
cd example
sed -i -e '/delToDevMain/d' -e 's-//toDevMain//--' app/build.gradle settings.gradle
./gradlew assembleMainFlavor --stacktrace
- uses: actions/upload-artifact@v2
with:
name: example
path: example/app/build/outputs/apk/mainFlavor/debug/app-mainFlavor-debug.apk
- if: startsWith(github.ref, 'refs/tags/')
run: |
cd example/app/build/outputs/apk/mainFlavor/release/
echo $RELEASE_KEY | base64 -d > release-key.jks
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release-key.jks -storepass $STOREPASS -keypass $KEYPASS app-mainFlavor-release-unsigned.apk unifiedpush
jarsigner -verify app-mainFlavor-release-unsigned.apk
sudo apt-get install zipalign -y
zipalign -v 4 app-mainFlavor-release-unsigned.apk UP-Example.apk
env:
RELEASE_KEY: ${{ secrets.RELEASE_KEY }}
KEYPASS: ${{ secrets.KEYPASS }}
STOREPASS: ${{ secrets.STOREPASS }}
- if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: example/app/build/outputs/apk/mainFlavor/release/UP-Example.apk
tag: ${{ github.ref }}
overwrite: true