creek

The AI Image Editor of 2030

.github/workflows/release.yml (2189B)


 1name: Release Android Build
 2
 3on:
 4  push:
 5    tags:
 6      - "v*"
 7
 8permissions:
 9  contents: write
10
11jobs:
12  build:
13    name: Build APK and Release
14    runs-on: ubuntu-latest
15
16    steps:
17      # 1. Checkout Code
18      - name: Checkout
19        uses: actions/checkout@v4
20
21      # 2. Setup Java
22      - name: Setup Java
23        uses: actions/setup-java@v4
24        with:
25          distribution: "temurin"
26          java-version: "17"
27
28      # 3. Setup Flutter
29      - name: Setup Flutter
30        uses: subosito/flutter-action@v2
31        with:
32          channel: "stable"
33          flutter-version: "3.38.x"
34
35      # 4. Create .env file from Secrets
36      - name: Create .env file
37        run: echo "${{ secrets.ENV_FILE_CONTENT }}" > .env
38
39      # 5. Decode Keystore (For Signing)
40      - name: Decode Keystore
41        run: |
42          echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/upload-keystore.jks
43          echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> android/key.properties
44          echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
45          echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
46          echo "storeFile=upload-keystore.jks" >> android/key.properties
47
48      # 6. Setup Python 3.8
49      - name: Setup Python
50        uses: actions/setup-python@v5
51        with:
52          python-version: "3.8"
53
54      # 7. Download Assets (Models)
55      - name: Download Assets
56        run: |
57          pip install gdown
58          gdown "https://drive.google.com/drive/folders/1b2cEsZao5miX7WxYmp160XkKd_lfBmPN" -O downloaded_models --folder
59          mv downloaded_models/* assets/
60          rm -rf downloaded_models
61
62      # 8. Install Flutter Dependencies
63      - name: Install Dependencies
64        run: flutter pub get
65
66      # 9. Build Release APK
67      - name: Build APK
68        run: flutter build apk --release
69
70      # 10. Create GitHub Release
71      - name: Create Release
72        uses: softprops/action-gh-release@v2
73        if: startsWith(github.ref, 'refs/tags/')
74        with:
75          files: build/app/outputs/flutter-apk/app-release.apk
76          generate_release_notes: false
77          body: "creekui"