Skip to content

Настройка для минимизации приложения вместо закрытия. #12

Настройка для минимизации приложения вместо закрытия.

Настройка для минимизации приложения вместо закрытия. #12

Workflow file for this run

name: Windows & Android release
on:
push:
branches:
- main
paths:
- "lib/**"
jobs:
build_android:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Java and Flutter for Android
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
cache: gradle
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- name: Get dependencies
run: flutter pub get
- name: Build Android release
run: flutter build apk --release
- name: Publish in Telegram
run: curl -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendDocument -F chat_id="${{ secrets.TELEGRAM_TO }}" -F caption=' <b>🚧 Новый билд для Android</b>.' -F parse_mode='HTML' -F document=@'./build/app/outputs/flutter-apk/app-release.apk'
build_windows:
needs: build_android
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- name: Get dependencies
run: flutter pub get
- name: Build Windows release
run: flutter build windows --release
- name: Publish in Telegram
run: |
& "C:\Program Files\7-Zip\7z.exe" a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on "./Windows-release.7z" ./build/Windows/x64/runner/Release/
$telegramToken = $env:TELEGRAM_TOKEN
$telegramTo = $env:TELEGRAM_TO
$caption = '<b>🚧 Новый билд для #Windows</b>.'
$response = Invoke-RestMethod -Uri "https://api.telegram.org/bot$telegramToken/sendDocument" -Method Post -Form @{
chat_id = $telegramTo
caption = $caption
parse_mode = 'HTML'
document = Get-Item -Path './Windows-release.7z'
}
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}