release: v1.0.7 — hardening 4-axes (perf/qual/sécu/UI) + icône Files … #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| # Se déclenche au push d'un tag `v*` (ex : `git tag v0.9.5 && git push origin v0.9.5`). | |
| # Build l'APK signé via les secrets GitHub, calcule SHA256, crée la release. | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-and-release: | |
| name: Build signed APK + GitHub Release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: write # nécessaire pour créer la release | |
| steps: | |
| - name: Checkout app | |
| uses: actions/checkout@v6 | |
| with: | |
| path: notes_tech | |
| - name: Checkout files_tech_voice (path dependency) | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: gitubpatrice/files_tech_voice | |
| path: files_tech_voice | |
| - name: Checkout files_tech_core (path dependency) | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: gitubpatrice/files_tech_core | |
| path: files_tech_core | |
| - name: Setup Java 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Decode keystore | |
| env: | |
| KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }} | |
| run: | | |
| echo "$KEYSTORE_BASE64" | base64 -d > notes_tech/android/notestech-release.jks | |
| ls -la notes_tech/android/notestech-release.jks | |
| - name: Create key.properties | |
| env: | |
| STORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| run: | | |
| cat > notes_tech/android/key.properties << EOF | |
| storePassword=$STORE_PASSWORD | |
| keyPassword=$KEY_PASSWORD | |
| keyAlias=$KEY_ALIAS | |
| storeFile=notestech-release.jks | |
| EOF | |
| - name: Pub get | |
| working-directory: notes_tech | |
| run: flutter pub get | |
| - name: Build APK release (signed) | |
| working-directory: notes_tech | |
| run: flutter build apk --release | |
| - name: Rename + SHA256 | |
| id: sha | |
| run: | | |
| SRC=notes_tech/build/app/outputs/flutter-apk/app-release.apk | |
| DEST=notes_tech-v${{ steps.version.outputs.VERSION }}.apk | |
| cp "$SRC" "$DEST" | |
| SHA=$(sha256sum "$DEST" | awk '{print $1}') | |
| echo "SHA256=$SHA" >> $GITHUB_OUTPUT | |
| echo "APK_PATH=$DEST" >> $GITHUB_OUTPUT | |
| echo "APK signé : $DEST" | |
| echo "SHA-256 : $SHA" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| generate_release_notes: true | |
| body: | | |
| ## Vérification d'intégrité | |
| **APK arm64-v8a** : `${{ steps.sha.outputs.APK_PATH }}` | |
| **SHA-256** : | |
| ``` | |
| ${{ steps.sha.outputs.SHA256 }} | |
| ``` | |
| Vérifiez avec : | |
| ``` | |
| sha256sum notes_tech-v${{ steps.version.outputs.VERSION }}.apk | |
| ``` | |
| --- | |
| 🤖 Build automatique via GitHub Actions (commit `${{ github.sha }}`) | |
| files: ${{ steps.sha.outputs.APK_PATH }} | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| rm -f notes_tech/android/notestech-release.jks | |
| rm -f notes_tech/android/key.properties |