|
1 |
| -name: On Push |
| 1 | +name: Internal Or Beta Release |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | workflow_dispatch:
|
5 | 5 | inputs:
|
6 |
| - beta: |
7 |
| - description: 'true if this is a beta release' |
| 6 | + release_type: |
8 | 7 | required: false
|
9 |
| - default: 'false' |
10 |
| - push: |
11 |
| - branches: |
12 |
| - - master |
| 8 | + default: 'internal' |
| 9 | + description: Please select the release type |
| 10 | + type: choice |
| 11 | + options: |
| 12 | + - internal |
| 13 | + - beta |
13 | 14 |
|
14 | 15 | env:
|
15 | 16 | SUPPLY_UPLOAD_MAX_RETRIES: 5
|
16 | 17 |
|
17 | 18 | jobs:
|
| 19 | + build_desktop_app: |
| 20 | + strategy: |
| 21 | + matrix: |
| 22 | + os: |
| 23 | + - macos-latest |
| 24 | + - ubuntu-latest |
| 25 | + - windows-latest |
| 26 | + |
| 27 | + runs-on: ${{ matrix.os }} |
| 28 | + permissions: |
| 29 | + contents: write |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v4 |
| 32 | + - uses: actions/setup-java@v4 |
| 33 | + with: |
| 34 | + distribution: 'zulu' |
| 35 | + java-version: 17 |
| 36 | + |
| 37 | + - name: Build Desktop App |
| 38 | + env: |
| 39 | + NOTARIZATION_APPLE_ID: ${{ secrets.NOTARIZATION_APPLE_ID }} |
| 40 | + NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }} |
| 41 | + NOTARIZATION_TEAM_ID: ${{ secrets.NOTARIZATION_TEAM_ID }} |
| 42 | + run: ./gradlew packageReleaseDistributionForCurrentOS |
| 43 | + |
18 | 44 | app_build:
|
19 | 45 | name: Github, Firebase, and Sentry Release
|
| 46 | + needs: [ build_desktop_app ] |
20 | 47 | runs-on: ubuntu-latest
|
21 | 48 | permissions:
|
22 | 49 | contents: write
|
@@ -63,33 +90,37 @@ jobs:
|
63 | 90 | KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }}
|
64 | 91 | VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
|
65 | 92 | run: |
|
66 |
| - ./gradlew :mifospay:assembleRelease |
| 93 | + ./gradlew :mifospay-android:assembleRelease |
67 | 94 |
|
68 | 95 | - name: Archive Build
|
69 | 96 | uses: actions/upload-artifact@v4
|
70 | 97 | with:
|
71 | 98 | path: ./**/*.apk
|
72 | 99 |
|
73 | 100 | - name: Create Version File
|
74 |
| - if: github.event.inputs.beta == 'true' |
| 101 | + if: github.event.inputs.release_type == 'beta' |
75 | 102 | shell: bash
|
76 | 103 | env:
|
77 | 104 | VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
|
78 | 105 | run: |
|
79 |
| - echo $VERSION_CODE > ./app/build/outputs/version_code.txt |
| 106 | + echo $VERSION_CODE > ./mifospay-android/build/outputs/version_code.txt |
80 | 107 |
|
81 | 108 | - name: Create Github Pre-Release
|
82 |
| - if: github.event.inputs.beta == 'true' |
| 109 | + if: github.event.inputs.release_type == 'beta' |
83 | 110 |
|
84 | 111 | with:
|
85 | 112 | tag_name: ${{ steps.rel_number.outputs.version }}
|
86 |
| - body_path: ./app/build/outputs/changelogGithub |
| 113 | + body_path: ./mifospay-android/build/outputs/changelogGithub |
87 | 114 | draft: false
|
88 | 115 | prerelease: true
|
89 | 116 | files: |
|
90 |
| - ./mifospay/build/outputs/apk/demo/release/mifospay-demo-release.apk |
91 |
| - ./mifospay/build/outputs/apk/prod/release/mifospay-prod-release.apk |
92 |
| - ./mifospay/build/outputs/version_code.txt |
| 117 | + ./mifospay-android/build/outputs/apk/demo/release/mifospay-android-demo-release.apk |
| 118 | + ./mifospay-android/build/outputs/apk/prod/release/mifospay-android-prod-release.apk |
| 119 | + ./mifospay-android/build/outputs/version_code.txt |
| 120 | + ./mifospay-desktop/build/compose/binaries/main-release/exe/*.exe |
| 121 | + ./mifospay-desktop/build/compose/binaries/main-release/msi/*.msi |
| 122 | + ./mifospay-desktop/build/compose/binaries/main-release/deb/*.deb |
| 123 | + ./mifospay-desktop/build/compose/binaries/main-release/dmg/*.dmg |
93 | 124 |
|
94 | 125 | - name: Print `git status`
|
95 | 126 | run: git status
|
@@ -144,11 +175,11 @@ jobs:
|
144 | 175 | KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }}
|
145 | 176 | VERSION_CODE: ${{ steps.rel_number.outputs.version-code }}
|
146 | 177 | run: |
|
147 |
| - ./gradlew :mifospay:bundleRelease |
| 178 | + ./gradlew :mifospay-android:bundleRelease |
148 | 179 |
|
149 | 180 | - name: Deploy to Playstore Internal
|
150 | 181 | run: bundle exec fastlane deploy_internal
|
151 | 182 |
|
152 | 183 | - name: Promote Internal to Beta
|
153 |
| - if: github.event.inputs.beta == 'true' |
| 184 | + if: github.event.inputs.release_type == 'beta' |
154 | 185 | run: bundle exec fastlane promote_to_beta
|
0 commit comments