mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-11 17:29:26 +02:00
ci: build release APK and publish a GitHub Release on main
Adds a Build APK workflow: on every push to main it builds the release APK with Flutter 3.35.3 and publishes it as a GitHub Release tagged with the pubspec version (v1.7.0 → xtremobile-v1.7.0.apk). On pull requests and manual runs the APK is built and uploaded as an artifact only. Bumps app version to 1.7.0+14 for this release. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0156exq7fejVrD3HKU3MmS8X
This commit is contained in:
2 files changed
+62
-1
No files matched your search
@@ -0,0 +1,61 @@
|
|||||||
|
# Construit l'APK release et publie une GitHub Release à chaque mise à jour
|
||||||
|
# de main (nouvelle version de l'app). Sur une pull request ou un lancement
|
||||||
|
# manuel (workflow_dispatch), l'APK est seulement construit et déposé en
|
||||||
|
# artifact — aucune release n'est publiée.
|
||||||
|
name: Build APK
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: '17'
|
||||||
|
|
||||||
|
- uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: stable
|
||||||
|
flutter-version: 3.35.3
|
||||||
|
cache: true
|
||||||
|
|
||||||
|
- name: Read app version from pubspec.yaml
|
||||||
|
id: version
|
||||||
|
run: echo "version=$(grep '^version:' pubspec.yaml | awk '{print $2}' | cut -d+ -f1)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- run: flutter pub get
|
||||||
|
|
||||||
|
- name: Build release APK
|
||||||
|
run: flutter build apk --release
|
||||||
|
|
||||||
|
- name: Rename APK with version
|
||||||
|
run: cp build/app/outputs/flutter-apk/app-release.apk "xtremobile-v${{ steps.version.outputs.version }}.apk"
|
||||||
|
|
||||||
|
- name: Upload APK artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: xtremobile-v${{ steps.version.outputs.version }}-apk
|
||||||
|
path: xtremobile-v${{ steps.version.outputs.version }}.apk
|
||||||
|
|
||||||
|
# La release n'est créée que sur main : un même numéro de version met à
|
||||||
|
# jour la release existante au lieu d'en créer une seconde.
|
||||||
|
- name: Publish GitHub Release
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: v${{ steps.version.outputs.version }}
|
||||||
|
name: XtremMobile v${{ steps.version.outputs.version }}
|
||||||
|
files: xtremobile-v${{ steps.version.outputs.version }}.apk
|
||||||
|
generate_release_notes: true
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
name: xtremobile
|
name: xtremobile
|
||||||
description: High-performance IPTV Android Application with Xtream Codes API
|
description: High-performance IPTV Android Application with Xtream Codes API
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 1.6.1+13
|
version: 1.7.0+14
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.0.0 <4.0.0'
|
sdk: '>=3.0.0 <4.0.0'
|
||||||
|
|||||||
Reference in new issue
Block a user