forked from MXCzkEVM/datadash-wallet
-
Notifications
You must be signed in to change notification settings - Fork 1
134 lines (111 loc) · 4.99 KB
/
submit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Submit to Google and Apple
on:
push:
branches:
- main
jobs:
build-apk:
name: Build-aab
runs-on: ubuntu-latest
steps:
- name: Checkout code with submodules
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set Version Code
run: |
echo "Received Number: ${{ github.run_number }}"
echo "VERSION_CODE=${{ github.run_number }}" >> $GITHUB_ENV
echo "Set VERSION_CODE to: ${{ github.run_number }}"
shell: bash
- uses: sheenhx/action-flutter-build-android@main
with:
keystore-base64: ${{ secrets.ANDROID_RELEASE_KEY }}
keystore-password: "${{ secrets.ANDROID_RELEASE_KEY_PASSWORD }}"
build-cmd: flutter build appbundle --release --build-number=${{ env.VERSION_CODE }} --flavor googlePlay
working-directory: ./
- name: Rename aab
run: mv build/app/outputs/bundle/googlePlayRelease/app-googlePlay-release.aab build/app/outputs/bundle/googlePlayRelease/moonchain.aab
- name: Zip debug symbols
run: cd build/app/intermediates/flutter/googlePlayRelease && zip -r native-debug-symbols.zip arm64-v8a armeabi-v7a x86_64
- name: Archive APK
uses: actions/upload-artifact@v4
with:
name: release-aab
# Try running the build locally with the build command to be sure of this path
path: build/app/outputs/bundle/googlePlayRelease/moonchain.aab
- uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.moonchain.app
releaseFiles: build/app/outputs/bundle/googlePlayRelease/moonchain.aab
track: alpha
status: draft
debugSymbols: build/app/intermediates/flutter/googlePlayRelease/native-debug-symbols.zip
build-macos:
name: Build-ios
runs-on: macos-15
steps:
- name: Select Xcode version 16.1
run: sudo xcode-select -s /Applications/Xcode_16.1.app
- name: Checkout code with submodules
uses: actions/checkout@v4
with:
submodules: recursive
- uses: sheenhx/action-flutter-build-ios@main
with:
# always use --export-options-plist=ios/GithubActionsExportOptions.plist
build-cmd: flutter build ipa --build-number=$(( 15 + ${{ github.run_number }})) --export-options-plist=ios/GithubActionsExportOptions.plist
certificate-base64: ${{ secrets.IOS_BUILD_CERTIFICATE_BASE64 }}
certificate-password: ${{ secrets.IOS_BUILD_CERTIFICATE_PASSWORD }}
provisioning-profile-base64: ${{ secrets.IOS_MOBILE_PROVISIONING_PROFILE_BASE64 }}
keychain-password: ${{ secrets.IOS_GITHUB_KEYCHAIN_PASSWORD }}
- name: Archive IPA
uses: actions/upload-artifact@v4
with:
name: release-ipa
# Try running the build locally with the build command to be sure of this path
path: build/ios/ipa/*.ipa
- name: "Upload app to TestFlight"
uses: henrik1/upload-testflight@v2
with:
app-path: "build/ios/ipa/moonchain.ipa"
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}
upload-combined:
name: Combine and Upload Builds
needs: [build-apk, build-macos]
runs-on: ubuntu-latest
steps:
- name: Download Ubuntu artifact
uses: actions/download-artifact@v4
with:
name: release-aab
path: combined-builds/android
- name: Download macOS artifact
uses: actions/download-artifact@v4
with:
name: release-ipa
path: combined-builds/iOS
- name: Upload combined artifacts
uses: actions/upload-artifact@v4
with:
name: combined-builds
path: combined-builds
- name: Generate
id: generate
uses: AcmeSoftwareLLC/app-build-number@v1
with:
timezone: Asia/Kathmandu
- name: Display the generated build number
run: echo "Build Number > ${{ steps.generate.outputs.build-number }}"
- uses: ncipollo/release-action@v1
with:
artifacts: "combined-builds/android/*.aab,combined-builds/iOS/*.ipa"
token: ${{ secrets.DART_TOKEN }}
tag: ${{ steps.generate.outputs.build-number }}
name: "Release-v${{ steps.generate.outputs.build-number }}-iOS/Android-Visit mxc1usd.com"
generateReleaseNotes: true
body: >
<a href="https://play.google.com/store/apps/details?id=com.moonchain.app" target="_blank"><img width="500" alt="image" src="https://github.com/user-attachments/assets/802b4fa6-8978-4b01-8de7-68207a5f8d77"></a><a href="https://apps.apple.com/app/moonbase-the-mining-hub/id6736371768" target="_blank"><img width="500" alt="image" src="https://github.com/user-attachments/assets/ed4678e2-4099-498c-92ee-94b88b620c21"></a>