-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (78 loc) · 2.61 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
81
82
83
84
85
86
87
88
89
90
91
92
name: Build app
on:
push:
branches:
- master
jobs:
build-Ace-Code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: John4650-hub/spaceshooter
ref: apk
path: spaceshooter
- run: ls -a && pwd
- uses: actions/setup-node@v3
with:
node-version: 16
- run: cd spaceshooter && sudo npm install --save-dev webpack webpack-cli
- run: cd spaceshooter/www && mkdir dist && cd ..
- run: cd spaceshooter && npm run build
- run: ls spaceshooter/
- run: cd spaceshooter && sudo npm install -g cordova
- run: cd spaceshooter && sudo cordova platform add android
- run: ls spaceshooter
- run: |
cd spaceshooter
sudo cordova plugin add cordova-plugin-file
sudo cordova plugin add cordova-clipboard-plugin
- 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: cd spaceshooter && sh clean.sh
- run: |
cd spaceshooter/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/spaceshooter/platforms/android/app/build/outputs/apk/debug/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 }} v4.0.6
- 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_name: shooter.apk
asset_content_type: application/zip