55 branches :
66 - main
77 - sixteen
8+ tags :
9+ - ' v*'
810 pull_request :
911 branches :
1012 - main
1113 - sixteen
1214 workflow_dispatch :
1315
16+ permissions :
17+ contents : write
18+
1419jobs :
1520 build :
1621 runs-on : ubuntu-latest
@@ -40,11 +45,40 @@ jobs:
4045 run : |
4146 sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0"
4247
48+ - name : Make gradlew executable
49+ run : chmod +x gradlew
50+
4351 - name : Build debug APK
44- run : gradle assembleDebug
52+ run : ./gradlew assembleDebug
53+
54+ - name : Build release APK
55+ run : ./gradlew assembleRelease
4556
46- - name : Upload APK artifact
57+ - name : Upload debug APK artifact
4758 uses : actions/upload-artifact@v4
4859 with :
49- name : redmagic-root-control- debug-apk
60+ name : redmagic-debug-apk
5061 path : app/build/outputs/apk/debug/*.apk
62+
63+ - name : Upload release APK artifact
64+ uses : actions/upload-artifact@v4
65+ with :
66+ name : redmagic-release-apk
67+ path : app/build/outputs/apk/release/*.apk
68+
69+ - name : Create GitHub Release from tag
70+ if : startsWith(github.ref, 'refs/tags/v')
71+ uses : softprops/action-gh-release@v2
72+ with :
73+ tag_name : ${{ github.ref_name }}
74+ name : Redmagic Control Center ${{ github.ref_name }}
75+ body : |
76+ Release ${{ github.ref_name }}
77+
78+ Included files:
79+ - Debug APK
80+ - Release APK
81+ files : |
82+ app/build/outputs/apk/debug/*.apk
83+ app/build/outputs/apk/release/*.apk
84+ generate_release_notes : true
0 commit comments