nextpush-android/.github/workflows/main.yml

39 lines
1.3 KiB
YAML
Raw Normal View History

2021-11-22 09:27:58 +01:00
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: 11
- run: ./gradlew build --stacktrace
- uses: actions/upload-artifact@v2
with:
name: build
path: app/build/outputs/apk/debug/app-debug.apk
- if: startsWith(github.ref, 'refs/tags/')
run: |
cd app/build/outputs/apk/release
echo $RELEASE_KEY | base64 -d > release-key.jks
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release-key.jks -storepass $STOREPASS -keypass $KEYPASS app-release-unsigned.apk nextpush
jarsigner -verify app-release-unsigned.apk
sudo apt-get install zipalign -y
zipalign -v 4 app-release-unsigned.apk nextpush.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: app/build/outputs/apk/release/nextpush.apk
tag: ${{ github.ref }}
overwrite: true