Merge pull request #5 from antheiz/master #24
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: Build Kamus Bahasa Moy App and Upload to GitHub Releases | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Trigger this workflow on version tag pushes (e.g., v1.0.0) | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| 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' | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Build APK | |
| run: flutter build apk --release | |
| - name: Debug Output | |
| run: | | |
| echo "Listing output directory content:" | |
| find build -name "*.apk" -type f | |
| shell: bash | |
| - name: Rename APK File | |
| run: | | |
| mkdir -p build/renamed | |
| cp build/app/outputs/flutter-apk/app-release.apk build/renamed/kamusbahasamoy-${{ github.ref_name }}.apk | |
| - name: Upload APK to GitHub Releases | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: build/renamed/kamusbahasamoy-${{ github.ref_name }}.apk | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |