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:
65
.github/workflows/build.yml
vendored
65
.github/workflows/build.yml
vendored
@@ -7,89 +7,75 @@ on:
|
||||
branches: [ main, ci* ]
|
||||
|
||||
jobs:
|
||||
get-version:
|
||||
get-info:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
name: ${{ steps.actual-get-version.outputs.name }}
|
||||
code: ${{ steps.actual-get-version.outputs.code }}
|
||||
commit: ${{ steps.actual-get-version.outputs.commit }}
|
||||
name: ${{ steps.actual-get-info.outputs.name }}
|
||||
code: ${{ steps.actual-get-info.outputs.code }}
|
||||
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install lua
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install lua5.3 -y
|
||||
- name: Get Version
|
||||
id: actual-get-version
|
||||
id: actual-get-info
|
||||
run: |
|
||||
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=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:
|
||||
runs-on: windows-latest
|
||||
needs: [get-version, get-cc-url]
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/snapshot-update
|
||||
with:
|
||||
commit: ${{ needs.get-version.outputs.commit }}
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
- uses: ./.github/actions/build-windows
|
||||
with:
|
||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win64.zip
|
||||
love-dir: love-11.3-win64
|
||||
cc-url: ${{ needs.get-cc-url.outputs.url }}/win64.zip
|
||||
version: ${{ needs.get-version.outputs.name }}
|
||||
arch: win64
|
||||
version: ${{ needs.get-info.outputs.name }}
|
||||
icon: .\.github\build\Windows\icon_snapshot.ico
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
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
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [get-version, get-cc-url]
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/snapshot-update
|
||||
with:
|
||||
commit: ${{ needs.get-version.outputs.commit }}
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
- uses: ./.github/actions/build-linux
|
||||
with:
|
||||
cc-url: ${{ needs.get-cc-url.outputs.url }}/linux.zip
|
||||
icon: .github/build/Linux/icon_snapshot.png
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
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
|
||||
|
||||
build-android:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [get-version, get-cc-url]
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/snapshot-update
|
||||
with:
|
||||
commit: ${{ needs.get-version.outputs.commit }}
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
- uses: ./.github/actions/build-android
|
||||
with:
|
||||
type: Snapshot
|
||||
cc-url: ${{ needs.get-cc-url.outputs.url }}
|
||||
code: ${{ needs.get-version.outputs.code }}
|
||||
name: ${{ needs.get-version.outputs.name }}
|
||||
code: ${{ needs.get-info.outputs.code }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
file-path: Techmino_Snapshot.apk
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
||||
@@ -98,26 +84,29 @@ jobs:
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
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
|
||||
|
||||
build-macOS:
|
||||
runs-on: macos-10.15
|
||||
needs: [get-version, get-cc-url]
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/snapshot-update
|
||||
with:
|
||||
commit: ${{ needs.get-version.outputs.commit }}
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
- uses: ./.github/actions/build-macos
|
||||
with:
|
||||
cc-url: ${{ needs.get-cc-url.outputs.url }}/macOS.zip
|
||||
name: ${{ needs.get-version.outputs.name }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
icon: .github/build/macOS/icon_snapshot.icns
|
||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||
MACOS_CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }}
|
||||
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
|
||||
- name: Pack Techmino
|
||||
run: |
|
||||
zip -r -y Techmino.zip Techmino.app
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-version.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-version.outputs.commit }}_macOS
|
||||
path: Techmino.app
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_macOS
|
||||
path: Techmino.zip
|
||||
|
||||
Reference in New Issue
Block a user