-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (69 loc) · 2.16 KB
/
build.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
name: Build app
on:
push:
branches:
- master
jobs:
build-Ace-Code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: sudo npm install --save-dev webpack webpack-cli
- run: cd www && mkdir dist && cd ..
- run: npm run build
- run: ls
- run: sudo npm install -g [email protected]
- run: sudo cordova platform add android
- run: ls
- run: sudo cordova plugin add cordova-plugin-file
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- uses: gradle/[email protected]
- name: Setup sdk
uses: android-actions/setup-android@v2
- run: sh clean.sh
- run: |
cd platforms
sudo cordova build android
ls -a
ls -lh android/app/build/outputs/apk/debug/
cd android/app/build/outputs/apk/debug/
sudo mv app-debug.apk /home/runner/work/Ace-Code/Ace-Code
- uses: actions/upload-artifact@v3
with:
name: upload_debug_apk
path: /home/runner/work/Ace-Code/Ace-Code/app-debug.apk
retention-days: 7
- run: ls
release:
name: Release apk
needs: build-Ace-Code
runs-on: ubuntu-latest
steps:
- name: Download apk from build
uses: actions/download-artifact@v1
with:
name: upload_debug_apk
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TK }}
with:
tag_name: ${{ github.run_number }}
release_name: ${{ github.event.repository.name }} v5.0.4 #release
- name: upload Release Apk
id: upload_release_assets
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.TK }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: upload_debug_apk/app-debug.apk
asset_name: ${{ github.event.repository.name }}.apk
asset_content_type: application/zip