chore: replace open_file_plus with open_filex, downgrade sodium depen… #5
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
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: Mobile CI | |
| "on": | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - 'lib/**' | |
| - 'android/**' | |
| - 'pubspec.yaml' | |
| - '.github/workflows/mobile-ci.yml' | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '17' | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Build release APK | |
| run: flutter build apk --release | |
| - name: Publish to GitHub Releases | |
| env: | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| run: | | |
| # Delete existing v1.0.0 release if it exists to allow overwriting, | |
| # or we could keep it and just update assets. | |
| # Using --cleanup-tag ensures the tag is also refreshed. | |
| gh release delete v1.0.0 --cleanup-tag --repo $GITHUB_REPOSITORY --yes 2>/dev/null || true | |
| # Rename the artifact to Peerchat.apk as requested | |
| mv build/app/outputs/flutter-apk/app-release.apk \ | |
| build/app/outputs/flutter-apk/PeerChat.apk | |
| # Create the release | |
| gh release create v1.0.0 \ | |
| --repo $GITHUB_REPOSITORY \ | |
| --title "PeerChat v1.0.0" \ | |
| --notes "Production-grade P2P messenger and file transfer app. Built automatically." \ | |
| build/app/outputs/flutter-apk/PeerChat.apk |