update cc-related CI (#387)
* merge get-cc-url into get-version * add `get-cc` * fix * fix again * fix * fix * fix macos * remove `apt update` * fix macos * rename `get-version` -> `get-info` * rm unnecessary file
This commit is contained in:
10
.github/actions/build-android/action.yml
vendored
10
.github/actions/build-android/action.yml
vendored
@@ -3,8 +3,6 @@ description: 'build Android package'
|
|||||||
inputs:
|
inputs:
|
||||||
type:
|
type:
|
||||||
required: true
|
required: true
|
||||||
cc-url:
|
|
||||||
required: true
|
|
||||||
code:
|
code:
|
||||||
required: true
|
required: true
|
||||||
name:
|
name:
|
||||||
@@ -34,9 +32,9 @@ runs:
|
|||||||
with:
|
with:
|
||||||
file-path: love-android/app/src/main/assets/game.love
|
file-path: love-android/app/src/main/assets/game.love
|
||||||
- name: Download ColdClear arm64-v8a
|
- name: Download ColdClear arm64-v8a
|
||||||
uses: ./.github/actions/get-unzip
|
uses: ./.github/actions/get-cc
|
||||||
with:
|
with:
|
||||||
url: ${{ inputs.cc-url }}/android_aarch64.zip
|
arch: android_aarch64
|
||||||
dir: ColdClear/arm64-v8a
|
dir: ColdClear/arm64-v8a
|
||||||
- name: Process ColdClear arm64-v8a
|
- name: Process ColdClear arm64-v8a
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -46,9 +44,9 @@ runs:
|
|||||||
mkdir -p libAndroid/arm64-v8a
|
mkdir -p libAndroid/arm64-v8a
|
||||||
mv ColdClear/arm64-v8a/libs/arm64-v8a/libCCloader.so libAndroid/arm64-v8a
|
mv ColdClear/arm64-v8a/libs/arm64-v8a/libCCloader.so libAndroid/arm64-v8a
|
||||||
- name: Download ColdClear armeabi-v7a
|
- name: Download ColdClear armeabi-v7a
|
||||||
uses: ./.github/actions/get-unzip
|
uses: ./.github/actions/get-cc
|
||||||
with:
|
with:
|
||||||
url: ${{ inputs.cc-url }}/android_armv7.zip
|
arch: android_armv7
|
||||||
dir: ColdClear/armeabi-v7a
|
dir: ColdClear/armeabi-v7a
|
||||||
- name: Process ColdClear armeabi-v7a
|
- name: Process ColdClear armeabi-v7a
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
6
.github/actions/build-linux/action.yml
vendored
6
.github/actions/build-linux/action.yml
vendored
@@ -1,8 +1,6 @@
|
|||||||
name: 'build Linux'
|
name: 'build Linux'
|
||||||
description: 'build Linux package'
|
description: 'build Linux package'
|
||||||
inputs:
|
inputs:
|
||||||
cc-url:
|
|
||||||
required: true
|
|
||||||
file-path:
|
file-path:
|
||||||
required: false
|
required: false
|
||||||
default: Techmino.AppImage
|
default: Techmino.AppImage
|
||||||
@@ -22,9 +20,9 @@ runs:
|
|||||||
chmod 777 love-11.3-x86_64.AppImage
|
chmod 777 love-11.3-x86_64.AppImage
|
||||||
./love-11.3-x86_64.AppImage --appimage-extract
|
./love-11.3-x86_64.AppImage --appimage-extract
|
||||||
- name: Download ColdClear
|
- name: Download ColdClear
|
||||||
uses: ./.github/actions/get-unzip
|
uses: ./.github/actions/get-cc
|
||||||
with:
|
with:
|
||||||
url: ${{ inputs.cc-url }}
|
arch: linux
|
||||||
- name: Pack Techmino
|
- name: Pack Techmino
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
10
.github/actions/build-macos/action.yml
vendored
10
.github/actions/build-macos/action.yml
vendored
@@ -1,14 +1,14 @@
|
|||||||
name: 'build Mac OS'
|
name: 'build Mac OS'
|
||||||
description: 'build Mac OS package'
|
description: 'build Mac OS package'
|
||||||
inputs:
|
inputs:
|
||||||
cc-url:
|
|
||||||
required: true
|
|
||||||
name:
|
name:
|
||||||
required: true
|
required: true
|
||||||
icon:
|
icon:
|
||||||
required: true
|
required: true
|
||||||
MACOS_CERTIFICATE:
|
MACOS_CERTIFICATE:
|
||||||
required: true
|
required: true
|
||||||
|
MACOS_CERTIFICATE_ID:
|
||||||
|
required: true
|
||||||
MACOS_CERTIFICATE_PWD:
|
MACOS_CERTIFICATE_PWD:
|
||||||
required: true
|
required: true
|
||||||
runs:
|
runs:
|
||||||
@@ -20,9 +20,9 @@ runs:
|
|||||||
with:
|
with:
|
||||||
url: https://github.com/26F-Studio/Techmino/releases/download/v0.15.1/Techmino.app.zip
|
url: https://github.com/26F-Studio/Techmino/releases/download/v0.15.1/Techmino.app.zip
|
||||||
- name: Download ColdClear
|
- name: Download ColdClear
|
||||||
uses: ./.github/actions/get-unzip
|
uses: ./.github/actions/get-cc
|
||||||
with:
|
with:
|
||||||
url: ${{ inputs.cc-url }}
|
arch: macOS
|
||||||
- name: Modify template
|
- name: Modify template
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -42,4 +42,4 @@ runs:
|
|||||||
security unlock-keychain -p Techminohaowan build.keychain
|
security unlock-keychain -p Techminohaowan build.keychain
|
||||||
security import certificate.p12 -k build.keychain -P ${{ inputs.MACOS_CERTIFICATE_PWD }} -T /usr/bin/codesign
|
security import certificate.p12 -k build.keychain -P ${{ inputs.MACOS_CERTIFICATE_PWD }} -T /usr/bin/codesign
|
||||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k Techminohaowan build.keychain
|
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k Techminohaowan build.keychain
|
||||||
/usr/bin/codesign --force --deep -s 79B81FC5EA155243C973B5417B0996501F00EF55 Techmino.app -v
|
/usr/bin/codesign --force --deep -s ${{ inputs.MACOS_CERTIFICATE_ID }} Techmino.app -v
|
||||||
|
|||||||
6
.github/actions/build-windows/action.yml
vendored
6
.github/actions/build-windows/action.yml
vendored
@@ -5,7 +5,7 @@ inputs:
|
|||||||
required: true
|
required: true
|
||||||
love-dir:
|
love-dir:
|
||||||
required: true
|
required: true
|
||||||
cc-url:
|
arch:
|
||||||
required: true
|
required: true
|
||||||
version:
|
version:
|
||||||
required: true
|
required: true
|
||||||
@@ -22,9 +22,9 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: mv ${{ inputs.love-dir }} love
|
run: mv ${{ inputs.love-dir }} love
|
||||||
- name: Download ColdClear
|
- name: Download ColdClear
|
||||||
uses: ./.github/actions/get-unzip
|
uses: ./.github/actions/get-cc
|
||||||
with:
|
with:
|
||||||
url: ${{ inputs.cc-url }}
|
arch: ${{ inputs.arch }}
|
||||||
- name: Download ResourceHacker
|
- name: Download ResourceHacker
|
||||||
uses: ./.github/actions/get-unzip
|
uses: ./.github/actions/get-unzip
|
||||||
with:
|
with:
|
||||||
|
|||||||
32
.github/actions/get-cc/action.yml
vendored
Normal file
32
.github/actions/get-cc/action.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: 'get cc'
|
||||||
|
description: 'download cc into specific dir'
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
required: false
|
||||||
|
default:
|
||||||
|
arch:
|
||||||
|
required: true
|
||||||
|
dir:
|
||||||
|
required: false
|
||||||
|
default: '.'
|
||||||
|
repo:
|
||||||
|
required: false
|
||||||
|
default: 26F-Studio/cold_clear_ai_love2d_wrapper
|
||||||
|
temp-file:
|
||||||
|
required: false
|
||||||
|
default: temp.zip
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
echo "::set-output name=tag::"$(if [ -z "${{ inputs.tag }}" ]
|
||||||
|
then curl -w '%{url_effective}' -I -L -s -S https://github.com/${{ inputs.repo }}/releases/latest -o /dev/null | grep -o '\<[^/]*$'
|
||||||
|
else echo ${{ inputs.tag }}
|
||||||
|
fi)
|
||||||
|
id: get-tag
|
||||||
|
shell: bash
|
||||||
|
- uses: ./.github/actions/get-unzip
|
||||||
|
with:
|
||||||
|
url: https://github.com/${{ inputs.repo }}/releases/download/${{ steps.get-tag.outputs.tag }}/${{ inputs.arch }}.zip
|
||||||
|
dir: ${{ inputs.dir }}
|
||||||
|
temp-file: ${{ inputs.temp-file }}
|
||||||
7
.github/actions/get-unzip/action.yml
vendored
7
.github/actions/get-unzip/action.yml
vendored
@@ -6,10 +6,13 @@ inputs:
|
|||||||
dir:
|
dir:
|
||||||
required: false
|
required: false
|
||||||
default: '.'
|
default: '.'
|
||||||
|
temp-file:
|
||||||
|
required: false
|
||||||
|
default: temp.zip
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- run: curl -L ${{ inputs.url }} -o temp.zip
|
- run: curl -L ${{ inputs.url }} -o ${{ inputs.temp-file }}
|
||||||
shell: bash
|
shell: bash
|
||||||
- run: 7z x temp.zip -o${{ inputs.dir }}
|
- run: 7z x ${{ inputs.temp-file }} -o${{ inputs.dir }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
65
.github/workflows/build.yml
vendored
65
.github/workflows/build.yml
vendored
@@ -7,89 +7,75 @@ on:
|
|||||||
branches: [ main, ci* ]
|
branches: [ main, ci* ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
get-version:
|
get-info:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
outputs:
|
outputs:
|
||||||
name: ${{ steps.actual-get-version.outputs.name }}
|
name: ${{ steps.actual-get-info.outputs.name }}
|
||||||
code: ${{ steps.actual-get-version.outputs.code }}
|
code: ${{ steps.actual-get-info.outputs.code }}
|
||||||
commit: ${{ steps.actual-get-version.outputs.commit }}
|
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install lua
|
- name: Install lua
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -y
|
|
||||||
sudo apt-get install lua5.3 -y
|
sudo apt-get install lua5.3 -y
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: actual-get-version
|
id: actual-get-info
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||||
|
|
||||||
get-cc-url:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
outputs:
|
|
||||||
url: ${{ steps.get-url.outputs.url }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Get URL
|
|
||||||
id: get-url
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=url::https://github.com/26F-Studio/cold_clear_ai_love2d_wrapper/releases/download/$(python .github/workflows/getLatest.py -P)"
|
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: [get-version, get-cc-url]
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./.github/actions/snapshot-update
|
- uses: ./.github/actions/snapshot-update
|
||||||
with:
|
with:
|
||||||
commit: ${{ needs.get-version.outputs.commit }}
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
- uses: ./.github/actions/build-windows
|
- uses: ./.github/actions/build-windows
|
||||||
with:
|
with:
|
||||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
||||||
love-dir: love-11.3-win64
|
love-dir: love-11.3-win64
|
||||||
cc-url: ${{ needs.get-cc-url.outputs.url }}/win64.zip
|
arch: win64
|
||||||
version: ${{ needs.get-version.outputs.name }}
|
version: ${{ needs.get-info.outputs.name }}
|
||||||
icon: .\.github\build\Windows\icon_snapshot.ico
|
icon: .\.github\build\Windows\icon_snapshot.ico
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Techmino_${{ needs.get-version.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-version.outputs.commit }}_Windows
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Windows
|
||||||
path: love
|
path: love
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: [get-version, get-cc-url]
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./.github/actions/snapshot-update
|
- uses: ./.github/actions/snapshot-update
|
||||||
with:
|
with:
|
||||||
commit: ${{ needs.get-version.outputs.commit }}
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
- uses: ./.github/actions/build-linux
|
- uses: ./.github/actions/build-linux
|
||||||
with:
|
with:
|
||||||
cc-url: ${{ needs.get-cc-url.outputs.url }}/linux.zip
|
|
||||||
icon: .github/build/Linux/icon_snapshot.png
|
icon: .github/build/Linux/icon_snapshot.png
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Techmino_${{ needs.get-version.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-version.outputs.commit }}_Linux
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Linux
|
||||||
path: Techmino.AppImage
|
path: Techmino.AppImage
|
||||||
|
|
||||||
build-android:
|
build-android:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: [get-version, get-cc-url]
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./.github/actions/snapshot-update
|
- uses: ./.github/actions/snapshot-update
|
||||||
with:
|
with:
|
||||||
commit: ${{ needs.get-version.outputs.commit }}
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
- uses: ./.github/actions/build-android
|
- uses: ./.github/actions/build-android
|
||||||
with:
|
with:
|
||||||
type: Snapshot
|
type: Snapshot
|
||||||
cc-url: ${{ needs.get-cc-url.outputs.url }}
|
code: ${{ needs.get-info.outputs.code }}
|
||||||
code: ${{ needs.get-version.outputs.code }}
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
name: ${{ needs.get-version.outputs.name }}
|
|
||||||
file-path: Techmino_Snapshot.apk
|
file-path: Techmino_Snapshot.apk
|
||||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||||
@@ -98,26 +84,29 @@ jobs:
|
|||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Techmino_${{ needs.get-version.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-version.outputs.commit }}_Android
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Android
|
||||||
path: Techmino_Snapshot.apk
|
path: Techmino_Snapshot.apk
|
||||||
|
|
||||||
build-macOS:
|
build-macOS:
|
||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
needs: [get-version, get-cc-url]
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: ./.github/actions/snapshot-update
|
- uses: ./.github/actions/snapshot-update
|
||||||
with:
|
with:
|
||||||
commit: ${{ needs.get-version.outputs.commit }}
|
commit: ${{ needs.get-info.outputs.commit }}
|
||||||
- uses: ./.github/actions/build-macos
|
- uses: ./.github/actions/build-macos
|
||||||
with:
|
with:
|
||||||
cc-url: ${{ needs.get-cc-url.outputs.url }}/macOS.zip
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
name: ${{ needs.get-version.outputs.name }}
|
|
||||||
icon: .github/build/macOS/icon_snapshot.icns
|
icon: .github/build/macOS/icon_snapshot.icns
|
||||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||||
|
MACOS_CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }}
|
||||||
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
||||||
|
- name: Pack Techmino
|
||||||
|
run: |
|
||||||
|
zip -r -y Techmino.zip Techmino.app
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Techmino_${{ needs.get-version.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-version.outputs.commit }}_macOS
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_macOS
|
||||||
path: Techmino.app
|
path: Techmino.zip
|
||||||
|
|||||||
27
.github/workflows/getLatest.py
vendored
27
.github/workflows/getLatest.py
vendored
@@ -1,27 +0,0 @@
|
|||||||
import requests
|
|
||||||
import time
|
|
||||||
import json
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
def getColdClear(args):
|
|
||||||
while True:
|
|
||||||
get = requests.get(f'https://api.github.com/repos/{args.Repo}/releases')
|
|
||||||
if get.status_code != 200:
|
|
||||||
time.sleep(2)
|
|
||||||
else:
|
|
||||||
break
|
|
||||||
getJson = json.loads(get.text)
|
|
||||||
if args.Pre:
|
|
||||||
print (getJson[0]['tag_name'])
|
|
||||||
else:
|
|
||||||
for i in getJson:
|
|
||||||
if i['prerelease'] == args.Pre:
|
|
||||||
print (i['tag_name'])
|
|
||||||
break
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
parser = argparse.ArgumentParser(description='用于获取Github仓库的最新Release版本名')
|
|
||||||
parser.add_argument('-P', '--Pre', action='store_true', help = '是否获取pre')
|
|
||||||
parser.add_argument('-R', '--Repo', default = '26F-Studio/cold_clear_ai_love2d_wrapper', help = '获取的仓库, 默认为cold_clear_ai_love2d_wrapper, 输入格式为User/Repo')
|
|
||||||
args = parser.parse_args()
|
|
||||||
getColdClear(args)
|
|
||||||
109
.github/workflows/release.yml
vendored
109
.github/workflows/release.yml
vendored
@@ -6,22 +6,21 @@ on:
|
|||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
get-version:
|
get-info:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
outputs:
|
outputs:
|
||||||
name: ${{ steps.actual-get-version.outputs.name }}
|
name: ${{ steps.actual-get-info.outputs.name }}
|
||||||
code: ${{ steps.actual-get-version.outputs.code }}
|
code: ${{ steps.actual-get-info.outputs.code }}
|
||||||
release: ${{ steps.actual-get-version.outputs.release }}
|
release: ${{ steps.actual-get-info.outputs.release }}
|
||||||
updateTitle: ${{ steps.actual-get-version.outputs.updateTitle }}
|
updateTitle: ${{ steps.actual-get-info.outputs.updateTitle }}
|
||||||
commit: ${{ steps.actual-get-version.outputs.commit }}
|
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install lua
|
- name: Install lua
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -y
|
|
||||||
sudo apt-get install lua5.3 -y
|
sudo apt-get install lua5.3 -y
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: actual-get-version
|
id: actual-get-info
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||||
@@ -29,20 +28,9 @@ jobs:
|
|||||||
echo "::set-output name=updateTitle::$(lua .github/workflows/getVersion.lua -updateTitle)"
|
echo "::set-output name=updateTitle::$(lua .github/workflows/getVersion.lua -updateTitle)"
|
||||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||||
|
|
||||||
get-cc-url:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
outputs:
|
|
||||||
url: ${{ steps.get-url.outputs.url }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Get URL
|
|
||||||
id: get-url
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=url::https://github.com/26F-Studio/cold_clear_ai_love2d_wrapper/releases/download/$(python .github/workflows/getLatest.py)"
|
|
||||||
|
|
||||||
build-windows-x64:
|
build-windows-x64:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: [get-version, get-cc-url]
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Update Version
|
- name: Update Version
|
||||||
@@ -52,20 +40,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
||||||
love-dir: love-11.3-win64
|
love-dir: love-11.3-win64
|
||||||
cc-url: ${{ needs.get-cc-url.outputs.url }}/win64.zip
|
arch: win64
|
||||||
version: ${{ needs.get-version.outputs.release }}
|
version: ${{ needs.get-info.outputs.release }}
|
||||||
icon: .\.github\build\Windows\icon.ico
|
icon: .\.github\build\Windows\icon.ico
|
||||||
- name: Pack Techmino
|
- name: Pack Techmino
|
||||||
run: 7z a -tzip .\Techmino.a${{ needs.get-version.outputs.release }}.Win64.zip .\love
|
run: 7z a -tzip .\Techmino.a${{ needs.get-info.outputs.release }}.Win64.zip .\love
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.get-version.outputs.updateTitle }}
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
files: Techmino.a${{ needs.get-version.outputs.release }}.Win64.zip
|
files: Techmino.a${{ needs.get-info.outputs.release }}.Win64.zip
|
||||||
|
|
||||||
build-windows-x86:
|
build-windows-x86:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: [get-version, get-cc-url]
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Update Version
|
- name: Update Version
|
||||||
@@ -75,20 +63,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win32.zip
|
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win32.zip
|
||||||
love-dir: love-11.3-win32
|
love-dir: love-11.3-win32
|
||||||
cc-url: ${{ needs.get-cc-url.outputs.url }}/win32.zip
|
arch: win32
|
||||||
version: ${{ needs.get-version.outputs.release }}
|
version: ${{ needs.get-info.outputs.release }}
|
||||||
icon: .\.github\build\Windows\icon.ico
|
icon: .\.github\build\Windows\icon.ico
|
||||||
- name: Pack Techmino
|
- name: Pack Techmino
|
||||||
run: 7z a -tzip .\Techmino.a${{ needs.get-version.outputs.release }}.Win32.zip .\love
|
run: 7z a -tzip .\Techmino.a${{ needs.get-info.outputs.release }}.Win32.zip .\love
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.get-version.outputs.updateTitle }}
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
files: Techmino.a${{ needs.get-version.outputs.release }}.Win32.zip
|
files: Techmino.a${{ needs.get-info.outputs.release }}.Win32.zip
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: [get-version, get-cc-url]
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Update Version
|
- name: Update Version
|
||||||
@@ -96,18 +84,17 @@ jobs:
|
|||||||
python3 .github/workflows/updateVersion.py -T Version
|
python3 .github/workflows/updateVersion.py -T Version
|
||||||
- uses: ./.github/actions/build-linux
|
- uses: ./.github/actions/build-linux
|
||||||
with:
|
with:
|
||||||
cc-url: ${{ needs.get-cc-url.outputs.url }}/linux.zip
|
file-path: Techmino.a${{ needs.get-info.outputs.release }}.AppImage
|
||||||
file-path: Techmino.a${{ needs.get-version.outputs.release }}.AppImage
|
|
||||||
icon: .github/build/Linux/icon.png
|
icon: .github/build/Linux/icon.png
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.get-version.outputs.updateTitle }}
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
files: Techmino.a${{ needs.get-version.outputs.release }}.AppImage
|
files: Techmino.a${{ needs.get-info.outputs.release }}.AppImage
|
||||||
|
|
||||||
build-android:
|
build-android:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: [get-version, get-cc-url]
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Update Version
|
- name: Update Version
|
||||||
@@ -116,10 +103,9 @@ jobs:
|
|||||||
- uses: ./.github/actions/build-android
|
- uses: ./.github/actions/build-android
|
||||||
with:
|
with:
|
||||||
type: Release
|
type: Release
|
||||||
cc-url: ${{ needs.get-cc-url.outputs.url }}
|
code: ${{ needs.get-info.outputs.code }}
|
||||||
code: ${{ needs.get-version.outputs.code }}
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
name: ${{ needs.get-version.outputs.name }}
|
file-path: Techmino.a${{ needs.get-info.outputs.Version }}.apk
|
||||||
file-path: Techmino.a${{ needs.get-version.outputs.Version }}.apk
|
|
||||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||||
ALIAS: ${{ secrets.ALIAS }}
|
ALIAS: ${{ secrets.ALIAS }}
|
||||||
@@ -127,12 +113,12 @@ jobs:
|
|||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.get-version.outputs.updateTitle }}
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
files: Techmino.a${{ needs.get-version.outputs.Version }}.apk
|
files: Techmino.a${{ needs.get-info.outputs.Version }}.apk
|
||||||
|
|
||||||
build-android-mini:
|
build-android-mini:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: [get-version, get-cc-url]
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Update Version
|
- name: Update Version
|
||||||
@@ -144,10 +130,9 @@ jobs:
|
|||||||
- uses: ./.github/actions/build-android
|
- uses: ./.github/actions/build-android
|
||||||
with:
|
with:
|
||||||
type: Release
|
type: Release
|
||||||
cc-url: ${{ needs.get-cc-url.outputs.url }}
|
code: ${{ needs.get-info.outputs.code }}
|
||||||
code: ${{ needs.get-version.outputs.code }}
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
name: ${{ needs.get-version.outputs.name }}
|
file-path: Techmino.a${{ needs.get-info.outputs.Version }}.mini.apk
|
||||||
file-path: Techmino.a${{ needs.get-version.outputs.Version }}.mini.apk
|
|
||||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||||
ALIAS: ${{ secrets.ALIAS }}
|
ALIAS: ${{ secrets.ALIAS }}
|
||||||
@@ -155,12 +140,12 @@ jobs:
|
|||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.get-version.outputs.updateTitle }}
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
files: Techmino.a${{ needs.get-version.outputs.Version }}.mini.apk
|
files: Techmino.a${{ needs.get-info.outputs.Version }}.mini.apk
|
||||||
|
|
||||||
build-macOS:
|
build-macOS:
|
||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
needs: [get-version, get-cc-url]
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Update Version
|
- name: Update Version
|
||||||
@@ -168,23 +153,23 @@ jobs:
|
|||||||
python3 .github/workflows/updateVersion.py -T Version
|
python3 .github/workflows/updateVersion.py -T Version
|
||||||
- uses: ./.github/actions/build-macos
|
- uses: ./.github/actions/build-macos
|
||||||
with:
|
with:
|
||||||
cc-url: ${{ needs.get-cc-url.outputs.url }}/macOS.zip
|
name: ${{ needs.get-info.outputs.name }}
|
||||||
name: ${{ needs.get-version.outputs.name }}
|
|
||||||
icon: .github/build/macOS/icon.icns
|
icon: .github/build/macOS/icon.icns
|
||||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||||
|
MACOS_CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }}
|
||||||
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
||||||
- name: Pack Techmino
|
- name: Pack Techmino
|
||||||
run: |
|
run: |
|
||||||
zip -r -y Techmino.a${{ needs.get-version.outputs.Version }}.macOS.zip Techmino.app ".github/build/macOS/打不开?Can’t open the App?.pdf"
|
zip -r -y Techmino.a${{ needs.get-info.outputs.Version }}.macOS.zip Techmino.app ".github/build/macOS/打不开?Can’t open the App?.pdf"
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.get-version.outputs.updateTitle }}
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
files: Techmino.a${{ needs.get-version.outputs.Version }}.macOS.zip
|
files: Techmino.a${{ needs.get-info.outputs.Version }}.macOS.zip
|
||||||
|
|
||||||
build-love:
|
build-love:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: get-version
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Update Version
|
- name: Update Version
|
||||||
@@ -192,16 +177,16 @@ jobs:
|
|||||||
python3 .github/workflows/updateVersion.py -T Version
|
python3 .github/workflows/updateVersion.py -T Version
|
||||||
- uses: ./.github/actions/build-love
|
- uses: ./.github/actions/build-love
|
||||||
with:
|
with:
|
||||||
file-path: Techmino.a${{ needs.get-version.outputs.release }}.love
|
file-path: Techmino.a${{ needs.get-info.outputs.release }}.love
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.get-version.outputs.updateTitle }}
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
files: Techmino.a${{ needs.get-version.outputs.release }}.love
|
files: Techmino.a${{ needs.get-info.outputs.release }}.love
|
||||||
|
|
||||||
Add-Release-note:
|
Add-Release-note:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: get-version
|
needs: get-info
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install lua
|
- name: Install lua
|
||||||
@@ -215,5 +200,5 @@ jobs:
|
|||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: ${{ needs.get-version.outputs.updateTitle }}
|
name: ${{ needs.get-info.outputs.updateTitle }}
|
||||||
body_path: updateNote.txt
|
body_path: updateNote.txt
|
||||||
|
|||||||
Reference in New Issue
Block a user