Files
Libretranslate-app/.gitea/workflows/build.yml
T
2026-07-14 18:21:24 +00:00

117 lines
3.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Build Ceviri Uygulamasi
on:
push:
# Sadece yeni bir tag pushlandığında çalışır (Örn: git tag 1.0.0 && git push origin 1.0.0)
tags:
- '*'
workflow_dispatch: {}
jobs:
build-android:
runs-on: docker
container:
image: ghcr.io/cirruslabs/flutter:stable
steps:
- name: Runner Hazirligi (Node ve Git)
run: |
apt-get update && apt-get install -y git nodejs || true
- name: Kodu al
uses: https://gitea.com/actions/checkout@v4
- name: Bagimliliklari indir
run: flutter pub get
- name: APK derle
run: flutter build apk --release
- name: APK'yi artifact olarak yukle
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: ceviri-android-apk
path: build/app/outputs/flutter-apk/app-release.apk
build-linux:
runs-on: docker
container:
image: ubuntu:24.04
steps:
- name: Node ve Git Kur (Action'ların çalışabilmesi için şart)
run: |
apt-get update
apt-get install -y git nodejs curl unzip xz-utils
- name: Kodu al
uses: https://gitea.com/actions/checkout@v4
- name: Sistem bagimliliklarini kur
run: |
apt-get update
apt-get install -y clang cmake ninja-build \
pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
- name: Flutter SDK kur
run: |
git clone https://github.com/flutter/flutter.git -b stable --depth 1 /opt/flutter
echo "/opt/flutter/bin" >> "$GITHUB_PATH"
- name: Linux masaustu destegini ac
run: |
export PATH="/opt/flutter/bin:$PATH"
flutter config --enable-linux-desktop
flutter doctor
- name: Bagimliliklari indir
run: |
export PATH="/opt/flutter/bin:$PATH"
flutter pub get
- name: Linux derle
run: |
export PATH="/opt/flutter/bin:$PATH"
flutter build linux --release
- name: Bundle'i sikistir
run: |
cd build/linux/x64/release
tar -czf ceviri-linux-bundle.tar.gz bundle
- name: Linux bundle'i artifact olarak yukle
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: ceviri-linux-bundle
path: build/linux/x64/release/ceviri-linux-bundle.tar.gz
release:
name: Gitea Release Olustur
needs: [build-android, build-linux]
runs-on: docker
container:
image: ubuntu:24.04
steps:
- name: Node, Git ve Sertifikalari Kur
run: |
apt-get update
apt-get install -y git nodejs curl ca-certificates
- name: Android APK'yi indir
uses: https://gitea.com/actions/download-artifact@v3
with:
name: ceviri-android-apk
path: release-assets/
- name: Linux Bundle'i indir
uses: https://gitea.com/actions/download-artifact@v3
with:
name: ceviri-linux-bundle
path: release-assets/
- name: Gitea'da Sürümü Yükle
uses: https://gitea.com/actions/release-action@main
with:
files: |
release-assets/app-release.apk
release-assets/ceviri-linux-bundle.tar.gz
title: Release ${{ github.ref_name }}
api_key: ${{ secrets.GITEA_TOKEN }}