move some work into independent jobs (#366)

* change build branch in build.yml

* try with get-version

* fix get-version

* fix get-version again

* try use get-version everywhere

* use apt upgrade again

* fix get-version again

* fix get-version again

* fix get-version again

* fix get-version again

* independent get-cc-url

* fix get-cc-url

* remove 2 useless commands

* try action

* try fix action

* try action

* use get-unzip

* try windows build

* fix build-windows

* fix build-love

* try build-linux

* add shell in build-linux

* put `commit id` into `get-version`

* fix `updateVersion.py -T Version`

* try build-android

* add shell into `build-android`

* move away android signing from build-android

* apply build-android on android mini

* gain snapshot action

* fixes

* fix build-love

* use build-macos

* put more into build-android

* fix build-android

* put more into build-macos

* fix

* fix

* ci: use preinstalled ndk (#367)

* fix apk location

* move `rename` into `build-android`

* fix `build-android`

* rename variable; remove a level of zips in macOS

* shallow clone

* remove tons of `./`s

* fix icon in windows and linux

* reorganize build-android

Co-authored-by: 梦飞翔 <1149761294@qq.com>
This commit is contained in:
Imple Lee
2021-10-15 01:06:17 +08:00
committed by GitHub
parent dfa356e9d9
commit 7f8efcdf41
9 changed files with 449 additions and 598 deletions

42
.github/actions/build-linux/action.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: 'build Linux'
description: 'build Linux package'
inputs:
cc-url:
required: true
file-path:
required: false
default: Techmino.AppImage
icon:
required: true
runs:
using: "composite"
steps:
- name: Download AppImageKit
shell: bash
run: |
curl -OL https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage
- name: Download love
shell: bash
run: |
curl -OL https://github.com/love2d/love/releases/download/11.3/love-11.3-x86_64.AppImage
chmod 777 love-11.3-x86_64.AppImage
./love-11.3-x86_64.AppImage --appimage-extract
- name: Download ColdClear
uses: ./.github/actions/get-unzip
with:
url: ${{ inputs.cc-url }}
- name: Pack Techmino
shell: bash
run: |
rm -rf squashfs-root/love squashfs-root/love.desktop squashfs-root/love.svg squashfs-root/.DirIcon
mv .github/build/Linux/love.template squashfs-root/love
mv .github/build/Linux/Techmino.desktop.template squashfs-root/Techmino.desktop
mv ${{ inputs.icon }} squashfs-root/icon.png
cp squashfs-root/icon.png squashfs-root/.DirIcon
chmod 777 squashfs-root/love
mkdir -p squashfs-root/usr/share/Techmino
mv document media parts Zframework conf.lua main.lua version.lua squashfs-root/usr/share/Techmino
mv CCloader.so squashfs-root/usr/share/Techmino
mv libcold_clear.so squashfs-root/usr/lib
chmod 777 appimagetool-x86_64.AppImage
./appimagetool-x86_64.AppImage squashfs-root ${{ inputs.file-path }}