fix(ci): rename release assets to be user-friendly (Modern/Older/Emul… #20
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: Build and Release | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| android-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| - name: Get Dependencies | |
| run: flutter pub get | |
| - name: Build Android APK | |
| run: flutter build apk --release --split-per-abi | |
| - name: Upload Android Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-release | |
| path: build/app/outputs/flutter-apk/app-*-release.apk | |
| windows-build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| - name: Get Dependencies | |
| run: flutter pub get | |
| - name: Build Windows Executable | |
| run: flutter build windows --release | |
| - name: Upload Windows Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-release | |
| path: build/windows/x64/runner/Release | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: [android-build, windows-build] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: app-release | |
| path: app-release | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-release | |
| path: windows-release | |
| - name: Zip Windows Release | |
| run: | | |
| cd windows-release | |
| zip -r ../Sellio-${{ github.ref_name }}-Windows-PC.zip . | |
| cd .. | |
| - name: Rename APKs | |
| run: | | |
| cd app-release | |
| mv app-arm64-v8a-release.apk Sellio-${{ github.ref_name }}-Modern-Android-64bit.apk | |
| mv app-armeabi-v7a-release.apk Sellio-${{ github.ref_name }}-Older-Android-32bit.apk | |
| mv app-x86_64-release.apk Sellio-${{ github.ref_name }}-Intel-Emulator.apk | |
| cd .. | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| files: | | |
| app-release/Sellio-*.apk | |
| Sellio-*-Windows-PC.zip | |
| generate_release_notes: true |