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:
|
2023-06-06 09:12:39 +02:00
|
|
|
java-version: 17
|
2021-11-26 00:57:34 +01:00
|
|
|
- if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
|
|
run: ./gradlew build --stacktrace
|
|
|
|
- if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
2021-11-22 09:27:58 +01:00
|
|
|
run: |
|
2021-11-26 00:57:34 +01:00
|
|
|
export RELEASE_STORE_FILE=$(pwd)/release-key.jks
|
|
|
|
echo $RELEASE_KEY | base64 -d > $RELEASE_STORE_FILE
|
|
|
|
./gradlew -Psign build --stacktrace
|
|
|
|
cp app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/Nextpush.apk
|
2021-11-22 09:27:58 +01:00
|
|
|
env:
|
|
|
|
RELEASE_KEY: ${{ secrets.RELEASE_KEY }}
|
2021-11-26 01:45:26 +01:00
|
|
|
RELEASE_STORE_PASSWORD: ${{ secrets.RELEASE_STORE_PASSWORD }}
|
2021-11-26 00:57:34 +01:00
|
|
|
RELEASE_KEY_ALIAS: nextpush
|
2021-11-26 01:45:26 +01:00
|
|
|
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
|
2021-11-26 00:57:34 +01:00
|
|
|
- if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
2021-11-22 09:27:58 +01:00
|
|
|
uses: svenstaro/upload-release-action@v2
|
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
2021-11-26 00:57:34 +01:00
|
|
|
file: app/build/outputs/apk/release/Nextpush.apk
|
2021-11-22 09:27:58 +01:00
|
|
|
tag: ${{ github.ref }}
|
|
|
|
overwrite: true
|