99 push :
1010 tags :
1111 - v*
12- branches : [ master, reduce-wine ]
12+ branches : [ master, actions-dev ]
1313 pull_request :
1414 branches : [ master ]
1515 # # Allows you to run this workflow manually from the Actions tab
3939 pwd
4040 ls -l
4141 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
4343 npm install node-gyp nw-gyp npm -g
44+ node-gyp install
4445
4546 - id : Tag
4647 run : |
@@ -55,65 +56,34 @@ jobs:
5556 echo "::set-output name=name::$name"
5657
5758 - name : Build
58- run : docker-compose up
59-
60- - name : Refactor Directory Structure
6159 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 }}
7264
73- - name : Compress
65+ - name : Compress nodegit compiler
7466 run : |
7567 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
7975 ls -l
80- env :
81- name : ' WeChat_Dev_Tools_${{ steps.tag.outputs.tag }}'
8276
83- - name : Build AppImage && Pack
77+ - name : View Directory
8478 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 }}
10679 ls -l
107- env :
108- name : ' WeChat_Dev_Tools_${{ steps.tag.outputs.tag }}'
109- ARCH : ' ${{ matrix.ARCH }}'
110-
11180
11281 - name : Create release and upload artifacts
11382 if : startsWith(github.ref, 'refs/heads/')
11483 env :
11584 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
11685 run : |
86+ cd tmp/build
11787 wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
11888 chmod +x pyuploadtool-x86_64.AppImage
11989 ./pyuploadtool-x86_64.AppImage WeChat*.AppImage *.tar.gz
12797 name : ${{ steps.tag.outputs.name }}
12898 tag_name : ${{ steps.tag.outputs.tag }}
12999 files : |
130- *.tar.gz
131- *.AppImage
100+ tmp/build/ *.tar.gz
101+ tmp/build/ *.AppImage
0 commit comments