49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
name: Nekogram
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '**.md'
|
|
- '.github/**'
|
|
- '!.github/workflows/**'
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
linux:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: set up JDK 1.8
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
- name: Build
|
|
env:
|
|
KEYSTORE_PASS: ${{ secrets.KEYSTORE_PASS }}
|
|
ALIAS_NAME: ${{ secrets.ALIAS_NAME }}
|
|
ALIAS_PASS: ${{ secrets.ALIAS_PASS }}
|
|
run: |
|
|
./gradlew assembleAfatRelease
|
|
./gradlew bundleAfatRelease
|
|
- name: Upload to group
|
|
env:
|
|
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
|
|
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
|
|
run: |
|
|
OUTPUT="TMessagesProj/build/outputs"
|
|
export name=$(find $OUTPUT/apk -name "*.apk")
|
|
curl https://api.telegram.org/bot${BOT_TOKEN}/sendDocument -X POST -F chat_id="$CHANNEL_ID" -F document="@$name"
|
|
- uses: actions/upload-artifact@master
|
|
name: Upload artifact
|
|
with:
|
|
name: Nekogram
|
|
path: TMessagesProj/build/outputs/
|