9
9
push :
10
10
tags :
11
11
- v*
12
- branches : [ master, reduce-wine ]
12
+ branches : [ master, actions-dev ]
13
13
pull_request :
14
14
branches : [ master ]
15
15
# # Allows you to run this workflow manually from the Actions tab
39
39
pwd
40
40
ls -l
41
41
export ACTION_MODE=true
42
- npm uninstall node-gyp -g
42
+ sudo apt-get install -y libx11-dev libxkbfile-dev p7zip-full python2 python3 libkrb5-dev gcc openssl libssh2-1-dev g++ make
43
43
npm install node-gyp nw-gyp npm -g
44
+ node-gyp install
44
45
45
46
- id : Tag
46
47
run : |
@@ -55,65 +56,34 @@ jobs:
55
56
echo "::set-output name=name::$name"
56
57
57
58
- name : Build
58
- run : docker-compose up
59
-
60
- - name : Refactor Directory Structure
61
59
run : |
62
- sudo chmod -R 777 package.nw node
63
- ls -l
64
- sudo rm -rf cache tmp .git test
65
- mkdir ${{ env. name }}
66
- sudo find -maxdepth 1 -not -name ${{ env.name }} -not -name . -exec mv {} ${{ env.name }} \;
67
- sudo cp -r "${{ env.name }}/package.nw/node_modules/nodegit" nodegit
68
- sudo cp -r "${{ env.name }}/compiler" compiler
69
- ls -l
70
- env :
71
- name : ' WeChat_Dev_Tools_${{ steps.tag.outputs.tag }}'
60
+ # docker-compose up
61
+ tools/setup-wechat-devtools-bash
62
+ sudo chmod -R 755 package.nw
63
+ bash tools/build-release.sh ${{ steps.tag.outputs.tag }} ${{ matrix.ARCH }}
72
64
73
- - name : Compress
65
+ - name : Compress nodegit compiler
74
66
run : |
75
67
ls -l
76
- tar -zvcf compiler.tar.gz compiler
77
- tar -zvcf nodegit.tar.gz nodegit
78
- sudo rm -rf compiler nodegit ${{ env.name }}/node_modules
68
+ sudo cp -r package.nw/node_modules/nodegit tmp/build/nodegit
69
+ sudo cp -r compiler tmp/build/compiler
70
+ cd tmp/build
71
+ ls -l
72
+ tar -zcf compiler.tar.gz compiler
73
+ tar -zcf nodegit.tar.gz nodegit
74
+ sudo rm -rf compiler nodegit
79
75
ls -l
80
- env :
81
- name : ' WeChat_Dev_Tools_${{ steps.tag.outputs.tag }}'
82
76
83
- - name : Build AppImage && Pack
77
+ - name : View Directory
84
78
run : |
85
- bash ./${{ env.name }}/tools/appimage.sh
86
- wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
87
- chmod a+x appimagetool-x86_64.AppImage
88
- # build AppImage
89
- ./appimagetool-x86_64.AppImage ./${{ env.name }}/tmp/AppDir ${{ env.name }}_${{ env.ARCH }}_wine.AppImage
90
- # pack
91
- sudo rm -rf compiler nodegit ${{ env.name }}/tmp
92
- tar -zvcf ${{ env.name }}_${{ env.ARCH }}_wine.tar.gz ${{ env.name }}
93
-
94
- # reduce wine
95
- export NO_WINE=true
96
- bash ${{ env.name }}/tools/fix-core
97
- bash ${{ env.name }}/tools/fix-other
98
- bash ./${{ env.name }}/tools/appimage.sh
99
- # build AppImage
100
- ./appimagetool-x86_64.AppImage ./${{ env.name }}/tmp/AppDir ${{ env.name }}_${{ env.ARCH }}_no_wine.AppImage
101
- sudo rm -rf compiler nodegit ${{ env.name }}/tmp
102
- # pack
103
- tar -zvcf ${{ env.name }}_${{ env.ARCH }}_no_wine.tar.gz ${{ env.name }}
104
-
105
- sudo rm -rf appimagetool-x86_64.AppImage ${{ env.name }}
106
79
ls -l
107
- env :
108
- name : ' WeChat_Dev_Tools_${{ steps.tag.outputs.tag }}'
109
- ARCH : ' ${{ matrix.ARCH }}'
110
-
111
80
112
81
- name : Create release and upload artifacts
113
82
if : startsWith(github.ref, 'refs/heads/')
114
83
env :
115
84
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
116
85
run : |
86
+ cd tmp/build
117
87
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
118
88
chmod +x pyuploadtool-x86_64.AppImage
119
89
./pyuploadtool-x86_64.AppImage WeChat*.AppImage *.tar.gz
127
97
name : ${{ steps.tag.outputs.name }}
128
98
tag_name : ${{ steps.tag.outputs.tag }}
129
99
files : |
130
- *.tar.gz
131
- *.AppImage
100
+ tmp/build/ *.tar.gz
101
+ tmp/build/ *.AppImage
0 commit comments