- Unify workflow
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
name: Techmino Develop CI
|
name: Techmino CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, ci*]
|
branches: [main, ci*]
|
||||||
|
tags: [pre*, v*]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
env:
|
env:
|
||||||
|
BUILD_TYPE: ${{ fromJSON('["dev", "release"]')[startsWith(github.ref, 'refs/tags/v')] }}
|
||||||
CORE_LOVE_PACKAGE_PATH: ./core.love
|
CORE_LOVE_PACKAGE_PATH: ./core.love
|
||||||
CORE_LOVE_ARTIFACT_NAME: core_love_package
|
CORE_LOVE_ARTIFACT_NAME: core_love_package
|
||||||
jobs:
|
jobs:
|
||||||
@@ -76,6 +78,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Core
|
name: ${{ needs.get-info.outputs.base-name }}_Core
|
||||||
path: ${{ env.PACKAGE_NAME }}
|
path: ${{ env.PACKAGE_NAME }}
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
body: ${{ github.event.head_commit.message }}
|
||||||
|
files: ${{ env.PACKAGE_NAME }}
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
- name: Upload to WeTransfer
|
- name: Upload to WeTransfer
|
||||||
id: transfer
|
id: transfer
|
||||||
run: |
|
run: |
|
||||||
@@ -145,7 +154,7 @@ jobs:
|
|||||||
keystore-key-password: ${{ secrets.ANDROID_KEYSTORE_KEYPASSWORD }}
|
keystore-key-password: ${{ secrets.ANDROID_KEYSTORE_KEYPASSWORD }}
|
||||||
keystore-store-password: ${{ secrets.ANDROID_KEYSTORE_STOREPASSWORD }}
|
keystore-store-password: ${{ secrets.ANDROID_KEYSTORE_STOREPASSWORD }}
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
resource-path: ./.github/build/android/dev/res
|
resource-path: ./.github/build/android/${{ env.BUILD_TYPE }}/res
|
||||||
libs-path: ./ColdClear/
|
libs-path: ./ColdClear/
|
||||||
extra-assets: ./libAndroid/
|
extra-assets: ./libAndroid/
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
||||||
@@ -162,6 +171,19 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Android_release
|
name: ${{ needs.get-info.outputs.base-name }}_Android_release
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}-release.apk
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}-release.apk
|
||||||
|
- name: Prepare for release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p release
|
||||||
|
mv ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}-release.apk release/${{ steps.process-app-name.outputs.product-name }}.apk
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
body: ${{ github.event.head_commit.message }}
|
||||||
|
files: release/${{ steps.process-app-name.outputs.product-name }}.apk
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
- name: Upload to WeTransfer
|
- name: Upload to WeTransfer
|
||||||
id: transfer
|
id: transfer
|
||||||
run: |
|
run: |
|
||||||
@@ -207,7 +229,7 @@ jobs:
|
|||||||
app-name: ${{ needs.get-info.outputs.app-name }}
|
app-name: ${{ needs.get-info.outputs.app-name }}
|
||||||
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
||||||
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
||||||
icon-path: ./.github/build/iOS/dev/icon
|
icon-path: ./.github/build/iOS/${{ env.BUILD_TYPE }}/icon
|
||||||
love-patch: ./.github/build/iOS/love.patch
|
love-patch: ./.github/build/iOS/love.patch
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
libs-path: ./ColdClear/arm64/
|
libs-path: ./ColdClear/arm64/
|
||||||
@@ -221,6 +243,8 @@ jobs:
|
|||||||
api-issuer-id: ${{ secrets.APPLE_API_ISSUER_ID }}
|
api-issuer-id: ${{ secrets.APPLE_API_ISSUER_ID }}
|
||||||
team-id: ${{ secrets.APPLE_DEVELOPER_TEAM_ID }}
|
team-id: ${{ secrets.APPLE_DEVELOPER_TEAM_ID }}
|
||||||
apple-id: ${{ secrets.APPLE_APPLE_ID }}
|
apple-id: ${{ secrets.APPLE_APPLE_ID }}
|
||||||
|
external-test: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
|
store-release: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
- name: Upload logs artifact
|
- name: Upload logs artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -234,6 +258,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_iOS_ipa
|
name: ${{ needs.get-info.outputs.base-name }}_iOS_ipa
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.ipa
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.ipa
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
body: ${{ github.event.head_commit.message }}
|
||||||
|
files: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.ipa
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
- name: Upload to WeTransfer
|
- name: Upload to WeTransfer
|
||||||
id: transfer
|
id: transfer
|
||||||
run: |
|
run: |
|
||||||
@@ -283,9 +314,9 @@ jobs:
|
|||||||
id: build-packages
|
id: build-packages
|
||||||
uses: 26F-Studio/love-actions-linux@v1
|
uses: 26F-Studio/love-actions-linux@v1
|
||||||
with:
|
with:
|
||||||
desktop-file-path: ./.github/build/linux/dev/template.desktop
|
desktop-file-path: ./.github/build/linux/${{ env.BUILD_TYPE }}/template.desktop
|
||||||
executable-name: app
|
executable-name: app
|
||||||
icon-path: ./.github/build/linux/dev/icon.png
|
icon-path: ./.github/build/linux/${{ env.BUILD_TYPE }}/icon.png
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
libs-path: ./ColdClear/libs/
|
libs-path: ./ColdClear/libs/
|
||||||
shared-path: ./ColdClear/shared/
|
shared-path: ./ColdClear/shared/
|
||||||
@@ -296,6 +327,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Linux
|
name: ${{ needs.get-info.outputs.base-name }}_Linux
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.AppImage
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.AppImage
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
body: ${{ github.event.head_commit.message }}
|
||||||
|
files: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.AppImage
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
- name: Upload to WeTransfer
|
- name: Upload to WeTransfer
|
||||||
id: transfer
|
id: transfer
|
||||||
run: |
|
run: |
|
||||||
@@ -345,7 +383,7 @@ jobs:
|
|||||||
app-name: ${{ needs.get-info.outputs.app-name }}
|
app-name: ${{ needs.get-info.outputs.app-name }}
|
||||||
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
||||||
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
||||||
icon-path: ./.github/build/macOS/dev/icon.icns
|
icon-path: ./.github/build/macOS/${{ env.BUILD_TYPE }}/icon.icns
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
libs-path: ./ColdClear/universal/
|
libs-path: ./ColdClear/universal/
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
||||||
@@ -358,6 +396,8 @@ jobs:
|
|||||||
api-issuer-id: ${{ secrets.APPLE_API_ISSUER_ID }}
|
api-issuer-id: ${{ secrets.APPLE_API_ISSUER_ID }}
|
||||||
team-id: ${{ secrets.APPLE_DEVELOPER_TEAM_ID }}
|
team-id: ${{ secrets.APPLE_DEVELOPER_TEAM_ID }}
|
||||||
apple-id: ${{ secrets.APPLE_APPLE_ID }}
|
apple-id: ${{ secrets.APPLE_APPLE_ID }}
|
||||||
|
external-test: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
|
store-release: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
- name: Upload logs artifact
|
- name: Upload logs artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@@ -371,6 +411,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_macOS_appstore_pkg
|
name: ${{ needs.get-info.outputs.base-name }}_macOS_appstore_pkg
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.pkg
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.pkg
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
body: ${{ github.event.head_commit.message }}
|
||||||
|
files: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.pkg
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
- name: Upload to WeTransfer
|
- name: Upload to WeTransfer
|
||||||
id: transfer
|
id: transfer
|
||||||
run: |
|
run: |
|
||||||
@@ -420,7 +467,7 @@ jobs:
|
|||||||
app-name: ${{ needs.get-info.outputs.app-name }}
|
app-name: ${{ needs.get-info.outputs.app-name }}
|
||||||
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
||||||
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
||||||
icon-path: ./.github/build/macOS/dev/icon.icns
|
icon-path: ./.github/build/macOS/${{ env.BUILD_TYPE }}/icon.icns
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
libs-path: ./ColdClear/universal/
|
libs-path: ./ColdClear/universal/
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
||||||
@@ -433,12 +480,12 @@ jobs:
|
|||||||
developer-id-application-password: ${{ secrets.APPLE_CERT_DEVELOPER_ID_APPLICATION_PWD }}
|
developer-id-application-password: ${{ secrets.APPLE_CERT_DEVELOPER_ID_APPLICATION_PWD }}
|
||||||
developer-id-installer-base64: ${{ secrets.APPLE_CERT_DEVELOPER_ID_INSTALLER }}
|
developer-id-installer-base64: ${{ secrets.APPLE_CERT_DEVELOPER_ID_INSTALLER }}
|
||||||
developer-id-installer-password: ${{ secrets.APPLE_CERT_DEVELOPER_ID_INSTALLER_PWD }}
|
developer-id-installer-password: ${{ secrets.APPLE_CERT_DEVELOPER_ID_INSTALLER_PWD }}
|
||||||
dmg-background-path: ./.github/build/macOS/dev/dmg.png
|
dmg-background-path: ./.github/build/macOS/${{ env.BUILD_TYPE }}/dmg.png
|
||||||
dmg-icon-position: "239 203"
|
dmg-icon-position: "239 203"
|
||||||
dmg-icon-size: "100"
|
dmg-icon-size: "100"
|
||||||
dmg-link-position: "565 203"
|
dmg-link-position: "565 203"
|
||||||
dmg-text-size: "12"
|
dmg-text-size: "12"
|
||||||
dmg-volume-icon-path: ./.github/build/macOS/dev/dmg.icns
|
dmg-volume-icon-path: ./.github/build/macOS/${{ env.BUILD_TYPE }}/dmg.icns
|
||||||
dmg-volume-name: ${{ steps.process-app-name.outputs.product-name }}
|
dmg-volume-name: ${{ steps.process-app-name.outputs.product-name }}
|
||||||
dmg-window-position: "200 120"
|
dmg-window-position: "200 120"
|
||||||
dmg-window-size: "800 500"
|
dmg-window-size: "800 500"
|
||||||
@@ -457,6 +504,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_macOS_portable_bare
|
name: ${{ needs.get-info.outputs.base-name }}_macOS_portable_bare
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.zip
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.zip
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
body: ${{ github.event.head_commit.message }}
|
||||||
|
files: |
|
||||||
|
${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.pkg
|
||||||
|
${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}.dmg
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
- name: Upload to WeTransfer
|
- name: Upload to WeTransfer
|
||||||
id: transfer
|
id: transfer
|
||||||
run: |
|
run: |
|
||||||
@@ -493,8 +549,8 @@ jobs:
|
|||||||
id: build-packages
|
id: build-packages
|
||||||
uses: 26F-Studio/love-actions-windows@v1
|
uses: 26F-Studio/love-actions-windows@v1
|
||||||
with:
|
with:
|
||||||
icon-path: ./.github/build/windows/dev/icon.ico
|
icon-path: ./.github/build/windows/${{ env.BUILD_TYPE }}/icon.ico
|
||||||
rc-path: ./.github/build/windows/dev/template.rc
|
rc-path: ./.github/build/windows/${{ env.BUILD_TYPE }}/template.rc
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
||||||
version-string: ${{ needs.get-info.outputs.version-string }}
|
version-string: ${{ needs.get-info.outputs.version-string }}
|
||||||
@@ -509,6 +565,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Windows_x64
|
name: ${{ needs.get-info.outputs.base-name }}_Windows_x64
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x64.zip
|
path: ${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x64.zip
|
||||||
|
- name: Upload release
|
||||||
|
if: ${{ startsWith(github.ref, 'refs/tags/pre') || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
body: ${{ github.event.head_commit.message }}
|
||||||
|
files: |
|
||||||
|
${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x86.zip
|
||||||
|
${{ env.OUTPUT_FOLDER }}/${{ steps.process-app-name.outputs.product-name }}_x64.zip
|
||||||
|
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre') }}
|
||||||
- name: Get transfer
|
- name: Get transfer
|
||||||
env:
|
env:
|
||||||
TEMP_PATH: ./temp.zip
|
TEMP_PATH: ./temp.zip
|
||||||
@@ -561,7 +626,7 @@ jobs:
|
|||||||
"description": "CI triggered at ${{ needs.get-info.outputs.commit-hash }}",
|
"description": "CI triggered at ${{ needs.get-info.outputs.commit-hash }}",
|
||||||
"url":"https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
|
"url":"https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
|
||||||
"thumbnail":{
|
"thumbnail":{
|
||||||
"url":"https://raw.githubusercontent.com/${{ github.repository }}/main/.github/build/linux/dev/icon.png"
|
"url":"https://raw.githubusercontent.com/${{ github.repository }}/main/.github/build/linux/${{ env.BUILD_TYPE }}/icon.png"
|
||||||
},
|
},
|
||||||
"color":36863,
|
"color":36863,
|
||||||
"fields":[
|
"fields":[
|
||||||
215
.github/workflows/release.yml
vendored
215
.github/workflows/release.yml
vendored
@@ -1,215 +0,0 @@
|
|||||||
name: Techmino Release CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
get-info:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
outputs:
|
|
||||||
name: ${{ steps.lua-related.outputs.name }}
|
|
||||||
apkCode: ${{ steps.lua-related.outputs.apkCode }}
|
|
||||||
code: ${{ steps.lua-related.outputs.code }}
|
|
||||||
release: ${{ steps.lua-related.outputs.release }}
|
|
||||||
updateTitle: ${{ steps.lua-related.outputs.updateTitle }}
|
|
||||||
updateNote: ${{ steps.lua-related.outputs.updateNote }}
|
|
||||||
commit: ${{ steps.git-related.outputs.commit }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install lua
|
|
||||||
run: |
|
|
||||||
sudo apt-get install lua5.3 -y
|
|
||||||
- name: Get Version
|
|
||||||
id: lua-related
|
|
||||||
shell: lua {0}
|
|
||||||
run: |
|
|
||||||
local version = require 'version'
|
|
||||||
print("::set-output name=name::"..version.string)
|
|
||||||
print(("::set-output name=apkCode::%d"):format(version.apkCode))
|
|
||||||
print(("::set-output name=code::%d"):format(version.code))
|
|
||||||
print("::set-output name=release::"..version.string:gsub("V", "", 1))
|
|
||||||
|
|
||||||
local note = require 'parts.updateLog'
|
|
||||||
local p1 = note:find("\n%d") + 1
|
|
||||||
local p2 = note:find("\n", p1) - 1
|
|
||||||
print("::set-output name=updateTitle::"..note:sub(p1, p2))
|
|
||||||
|
|
||||||
local p3 = note:find("\n", note:find("\n%d") + 1) + 1
|
|
||||||
local p4 = note:find("\n%d", p3 + 1)
|
|
||||||
print("::set-output name=updateNote::"..note:sub(p3, p4 - 2)
|
|
||||||
:gsub(" ", "- ")
|
|
||||||
:gsub(" ", "# ")
|
|
||||||
:gsub('%%', '%%25')
|
|
||||||
:gsub('\n', '%%0A')
|
|
||||||
:gsub('\r', '%%0D'))
|
|
||||||
- name: Get Commit
|
|
||||||
id: git-related
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
|
||||||
|
|
||||||
build-windows-x64:
|
|
||||||
runs-on: windows-latest
|
|
||||||
needs: get-info
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: 'recursive'
|
|
||||||
- uses: ./.github/actions/update-version
|
|
||||||
- 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
|
|
||||||
arch: win64
|
|
||||||
version: ${{ needs.get-info.outputs.release }}
|
|
||||||
icon: .\.github\build\Windows\icon.ico
|
|
||||||
- name: Pack Techmino
|
|
||||||
run: 7z a -tzip .\Techmino_a${{ needs.get-info.outputs.release }}_Win64.zip .\love
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
|
||||||
files: Techmino_a${{ needs.get-info.outputs.release }}_Win64.zip
|
|
||||||
|
|
||||||
build-windows-x86:
|
|
||||||
runs-on: windows-latest
|
|
||||||
needs: get-info
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: 'recursive'
|
|
||||||
- uses: ./.github/actions/update-version
|
|
||||||
- uses: ./.github/actions/build-windows
|
|
||||||
with:
|
|
||||||
love-url: https://github.com/love2d/love/releases/download/11.3/love-11.3-win32.zip
|
|
||||||
love-dir: love-11.3-win32
|
|
||||||
arch: win32
|
|
||||||
version: ${{ needs.get-info.outputs.release }}
|
|
||||||
icon: .\.github\build\Windows\icon.ico
|
|
||||||
- name: Pack Techmino
|
|
||||||
run: 7z a -tzip .\Techmino_a${{ needs.get-info.outputs.release }}_Win32.zip .\love
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
|
||||||
files: Techmino_a${{ needs.get-info.outputs.release }}_Win32.zip
|
|
||||||
|
|
||||||
build-linux:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs: get-info
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: 'recursive'
|
|
||||||
- uses: ./.github/actions/update-version
|
|
||||||
- uses: ./.github/actions/build-linux
|
|
||||||
with:
|
|
||||||
file-path: Techmino_a${{ needs.get-info.outputs.release }}_Linux.AppImage
|
|
||||||
icon: .github/build/Linux/icon.png
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
|
||||||
files: Techmino_a${{ needs.get-info.outputs.release }}_Linux.AppImage
|
|
||||||
|
|
||||||
build-android:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs: get-info
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: 'recursive'
|
|
||||||
- uses: ./.github/actions/update-version
|
|
||||||
- uses: ./.github/actions/build-android
|
|
||||||
with:
|
|
||||||
type: Release
|
|
||||||
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
|
||||||
name: ${{ needs.get-info.outputs.name }}
|
|
||||||
file-path: Techmino_a${{ needs.get-info.outputs.release }}_Android.apk
|
|
||||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
|
||||||
KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }}
|
|
||||||
ALIAS: ${{ secrets.ALIAS }}
|
|
||||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
|
||||||
files: Techmino_a${{ needs.get-info.outputs.release }}_Android.apk
|
|
||||||
|
|
||||||
build-macOS:
|
|
||||||
runs-on: macos-10.15
|
|
||||||
needs: get-info
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: 'recursive'
|
|
||||||
- uses: ./.github/actions/update-version
|
|
||||||
- uses: ./.github/actions/build-macos
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.name }}
|
|
||||||
icon: .github/build/macOS/icon.icns
|
|
||||||
APPLE_API_ID: "${{ secrets.APPLE_API_ID }}"
|
|
||||||
APPLE_API_ISSUER: "${{ secrets.APPLE_API_ISSUER }}"
|
|
||||||
APPLE_API_KEY: "${{ secrets.APPLE_API_KEY }}"
|
|
||||||
APPLE_APP_IDENTIFIER: "${{ secrets.APPLE_APP_IDENTIFIER }}"
|
|
||||||
APPLE_KEYCHAIN_NAME: "${{ secrets.APPLE_KEYCHAIN_NAME }}"
|
|
||||||
APPLE_KEYCHAIN_PWD: "${{ secrets.APPLE_KEYCHAIN_PWD }}"
|
|
||||||
FASTLANE_MATCH_PWD: "${{ secrets.FASTLANE_MATCH_PWD }}"
|
|
||||||
FASTLANE_MATCH_TOKEN: "${{ secrets.FASTLANE_MATCH_TOKEN }}"
|
|
||||||
- name: Pack Techmino
|
|
||||||
run: |
|
|
||||||
mv Techmino.dmg Techmino_a${{ needs.get-info.outputs.release }}_MacOS.dmg
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
|
||||||
files: Techmino_a${{ needs.get-info.outputs.release }}_MacOS.dmg
|
|
||||||
|
|
||||||
build-iOS:
|
|
||||||
runs-on: macos-latest
|
|
||||||
needs: get-info
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: 'recursive'
|
|
||||||
- uses: ./.github/actions/update-version
|
|
||||||
- uses: ./.github/actions/build-ios
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.name }}
|
|
||||||
type: "release"
|
|
||||||
APPLE_API_ID: "${{ secrets.APPLE_API_ID }}"
|
|
||||||
APPLE_API_ISSUER: "${{ secrets.APPLE_API_ISSUER }}"
|
|
||||||
APPLE_API_KEY: "${{ secrets.APPLE_API_KEY }}"
|
|
||||||
APPLE_APP_BUILD: "${{ needs.get-info.outputs.code }}.0.${{ github.run_number }}.${{ github.run_attempt }}"
|
|
||||||
APPLE_APP_CHANGELOG: "${{ needs.get-info.outputs.updateNote }}"
|
|
||||||
APPLE_APP_ID: "${{ secrets.APPLE_APP_ID }}"
|
|
||||||
APPLE_APP_IDENTIFIER: "${{ secrets.APPLE_APP_IDENTIFIER }}"
|
|
||||||
APPLE_APP_PROFILE: "${{ secrets.APPLE_APP_PROFILE }}"
|
|
||||||
APPLE_KEYCHAIN_NAME: "${{ secrets.APPLE_KEYCHAIN_NAME }}"
|
|
||||||
APPLE_KEYCHAIN_PWD: "${{ secrets.APPLE_KEYCHAIN_PWD }}"
|
|
||||||
FASTLANE_ACTION_ID: "${{ github.run_id }}"
|
|
||||||
FASTLANE_DISCORD_WEBHOOK: "${{ secrets.FASTLANE_DISCORD_WEBHOOK }}"
|
|
||||||
FASTLANE_MATCH_PWD: "${{ secrets.FASTLANE_MATCH_PWD }}"
|
|
||||||
FASTLANE_MATCH_TOKEN: "${{ secrets.FASTLANE_MATCH_TOKEN }}"
|
|
||||||
- name: Rename ipa
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mv Techmino.ipa Techmino_a${{ needs.get-info.outputs.release }}_iOS.ipa
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
|
||||||
files: Techmino_a${{ needs.get-info.outputs.release }}_iOS.ipa
|
|
||||||
|
|
||||||
Add-Release-note:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
needs: get-info
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.updateTitle }}
|
|
||||||
body: ${{ needs.get-info.outputs.updateNote }}
|
|
||||||
518
.github/workflows/test.yml
vendored
518
.github/workflows/test.yml
vendored
@@ -1,518 +0,0 @@
|
|||||||
name: Techmino Test CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "pre*"
|
|
||||||
|
|
||||||
env:
|
|
||||||
CORE_LOVE_PACKAGE_PATH: ./core.love
|
|
||||||
CORE_LOVE_ARTIFACT_NAME: core_love_package
|
|
||||||
jobs:
|
|
||||||
get-info:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
app-name: ${{ steps.app-info.outputs.app-name }}
|
|
||||||
version-name: ${{ steps.app-info.outputs.version-name }}
|
|
||||||
version-string: ${{ steps.app-info.outputs.version-string }}
|
|
||||||
version-code: ${{ steps.app-info.outputs.version-code }}
|
|
||||||
commit-hash: ${{ steps.git-info.outputs.commit-hash }}
|
|
||||||
base-name: ${{ steps.assemble-base-name.outputs.base-name }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Install lua
|
|
||||||
run: |
|
|
||||||
sudo apt-get install lua5.3 -y
|
|
||||||
- name: Get app info
|
|
||||||
id: app-info
|
|
||||||
shell: lua {0}
|
|
||||||
run: |
|
|
||||||
local version = require "version"
|
|
||||||
print("::set-output name=app-name::Techmino")
|
|
||||||
print("::set-output name=version-name::"..version.name)
|
|
||||||
print("::set-output name=version-string::"..version.string:gsub("%a", ""))
|
|
||||||
print(("::set-output name=version-code::%d"):format(version.code))
|
|
||||||
- name: Get git info
|
|
||||||
id: git-info
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
COMMIT_HASH=$(git rev-parse --short ${{ GITHUB.SHA }})
|
|
||||||
echo ::set-output name=commit-hash::$COMMIT_HASH
|
|
||||||
- name: Assemble package base name
|
|
||||||
id: assemble-base-name
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
BASE_NAME=Techmino_${{ steps.app-info.outputs.version-string }}_${{ steps.git-info.outputs.commit-hash }}_#${{ GITHUB.RUN_NUMBER }}
|
|
||||||
echo ::set-output name=base-name::$BASE_NAME
|
|
||||||
build-core:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: get-info
|
|
||||||
env:
|
|
||||||
PACKAGE_NAME: ./${{ needs.get-info.outputs.base-name }}_Core.love
|
|
||||||
outputs:
|
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- uses: ./.github/actions/update-version
|
|
||||||
with:
|
|
||||||
commit: ${{ needs.get-info.outputs.commit-hash }}
|
|
||||||
type: snapshot
|
|
||||||
- name: Build core love package
|
|
||||||
uses: 26F-Studio/love-actions-core@v1
|
|
||||||
with:
|
|
||||||
build-list: ./media/ ./parts/ ./Zframework/ ./conf.lua ./main.lua ./version.lua
|
|
||||||
package-path: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
|
||||||
- name: Upload core love package
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
|
||||||
path: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
|
||||||
- name: Rename love package
|
|
||||||
run: mv ${{ env.CORE_LOVE_PACKAGE_PATH }} ${{ env.PACKAGE_NAME }}
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Core
|
|
||||||
path: ${{ env.PACKAGE_NAME }}
|
|
||||||
- name: Upload to WeTransfer
|
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
curl -sL https://git.io/file-transfer | sh
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ env.PACKAGE_NAME }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
auto-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build-core
|
|
||||||
if: ${{ !always() }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Love actions for testing
|
|
||||||
uses: 26F-Studio/love-actions-test@v1
|
|
||||||
with:
|
|
||||||
font-path: ./parts/fonts/proportional.otf
|
|
||||||
language-folder: ./parts/language
|
|
||||||
build-android:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [get-info, build-core, auto-test]
|
|
||||||
if: ${{ !always() }}
|
|
||||||
env:
|
|
||||||
OUTPUT_FOLDER: ./build
|
|
||||||
outputs:
|
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Process app name
|
|
||||||
id: process-app-name
|
|
||||||
shell: python3 {0}
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
os.system("echo ::set-output name=bundle-id::org.f26_studio." + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}") + ".snapshot")
|
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}") + "_Snapshot")
|
|
||||||
- name: Download core love package
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
|
||||||
- name: Download ColdClear
|
|
||||||
uses: ./.github/actions/get-cc
|
|
||||||
with:
|
|
||||||
platform: Android
|
|
||||||
dir: ./ColdClear
|
|
||||||
- name: Process ColdClear
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir -p ./libAndroid/armeabi-v7a/
|
|
||||||
mkdir -p ./libAndroid/arm64-v8a/
|
|
||||||
mv ./ColdClear/armeabi-v7a/libCCloader.so ./libAndroid/armeabi-v7a/
|
|
||||||
mv ./ColdClear/arm64-v8a/libCCloader.so ./libAndroid/arm64-v8a/
|
|
||||||
- name: Build Android packages
|
|
||||||
id: build-packages
|
|
||||||
uses: 26F-Studio/love-actions-android@v1
|
|
||||||
with:
|
|
||||||
app-name: ${{ needs.get-info.outputs.app-name }}
|
|
||||||
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
|
||||||
icon-specifier: "@mipmap/icon"
|
|
||||||
keystore-alias: ${{ secrets.ANDROID_KEYSTORE_ALIAS }}
|
|
||||||
keystore-base64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
|
||||||
keystore-key-password: ${{ secrets.ANDROID_KEYSTORE_KEYPASSWORD }}
|
|
||||||
keystore-store-password: ${{ secrets.ANDROID_KEYSTORE_STOREPASSWORD }}
|
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
|
||||||
resource-path: ./.github/build/android/dev/res
|
|
||||||
libs-path: ./ColdClear/
|
|
||||||
extra-assets: ./libAndroid/
|
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
|
||||||
version-string: ${{ needs.get-info.outputs.version-string }}
|
|
||||||
version-code: ${{ needs.get-info.outputs.version-code }}
|
|
||||||
output-folder: ${{ env.OUTPUT_FOLDER }}
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Android
|
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/*
|
|
||||||
- name: Upload to WeTransfer
|
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
curl -sL https://git.io/file-transfer | sh
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
build-ios:
|
|
||||||
runs-on: macos-latest
|
|
||||||
needs: [get-info, build-core, auto-test]
|
|
||||||
if: ${{ always() }}
|
|
||||||
env:
|
|
||||||
OUTPUT_FOLDER: ./build
|
|
||||||
outputs:
|
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Process app name
|
|
||||||
id: process-app-name
|
|
||||||
shell: python3 {0}
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
os.system("echo ::set-output name=bundle-id::org.26f-studio.techmino")
|
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}"))
|
|
||||||
- name: Download core love package
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
|
||||||
- name: Download ColdClear
|
|
||||||
uses: ./.github/actions/get-cc
|
|
||||||
with:
|
|
||||||
platform: iOS
|
|
||||||
dir: ./ColdClear
|
|
||||||
- name: Build iOS packages
|
|
||||||
id: build-packages
|
|
||||||
uses: 26F-Studio/love-actions-ios@v1
|
|
||||||
with:
|
|
||||||
app-name: ${{ needs.get-info.outputs.app-name }}
|
|
||||||
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
|
||||||
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
|
||||||
icon-path: ./.github/build/iOS/dev/icon
|
|
||||||
love-patch: ./.github/build/iOS/love.patch
|
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
|
||||||
libs-path: ./ColdClear/arm64/
|
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
|
||||||
version-string: ${{ needs.get-info.outputs.version-string }}
|
|
||||||
output-folder: ${{ env.OUTPUT_FOLDER }}
|
|
||||||
apple-development-base64: ${{ secrets.APPLE_CERT_APPLE_DEVELOPMENT_BASE64 }}
|
|
||||||
apple-development-password: ${{ secrets.APPLE_CERT_APPLE_DEVELOPMENT_PWD }}
|
|
||||||
api-key: ${{ secrets.APPLE_API_KEY }}
|
|
||||||
api-key-id: ${{ secrets.APPLE_API_KEY_ID }}
|
|
||||||
api-issuer-id: ${{ secrets.APPLE_API_ISSUER_ID }}
|
|
||||||
team-id: ${{ secrets.APPLE_DEVELOPER_TEAM_ID }}
|
|
||||||
apple-id: ${{ secrets.APPLE_APPLE_ID }}
|
|
||||||
external-test: true
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_iOS
|
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/*
|
|
||||||
- name: Upload to WeTransfer
|
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
wget -qO- https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_darwin_amd64.tar.gz | tar xvz
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
build-linux:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [get-info, build-core, auto-test]
|
|
||||||
if: ${{ !always() }}
|
|
||||||
env:
|
|
||||||
OUTPUT_FOLDER: ./build
|
|
||||||
outputs:
|
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Process app name
|
|
||||||
id: process-app-name
|
|
||||||
shell: python3 {0}
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}"))
|
|
||||||
- name: Download core love package
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
|
||||||
- name: Download ColdClear
|
|
||||||
uses: ./.github/actions/get-cc
|
|
||||||
with:
|
|
||||||
platform: Linux
|
|
||||||
dir: ./ColdClear
|
|
||||||
- name: Process ColdClear
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd ./ColdClear
|
|
||||||
mkdir ./libs
|
|
||||||
mv ./x64/libcold_clear.so ./libs
|
|
||||||
mkdir ./shared
|
|
||||||
mv ./x64/CCloader.so ./shared
|
|
||||||
- name: Build Linux packages
|
|
||||||
id: build-packages
|
|
||||||
uses: 26F-Studio/love-actions-linux@v1
|
|
||||||
with:
|
|
||||||
desktop-file-path: ./.github/build/linux/dev/template.desktop
|
|
||||||
executable-name: app
|
|
||||||
icon-path: ./.github/build/linux/dev/icon.png
|
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
|
||||||
libs-path: ./ColdClear/libs/
|
|
||||||
shared-path: ./ColdClear/shared/
|
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
|
||||||
output-folder: ${{ env.OUTPUT_FOLDER }}
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Linux
|
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/*
|
|
||||||
- name: Upload to WeTransfer
|
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
curl -sL https://git.io/file-transfer | sh
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
build-macos-appstore:
|
|
||||||
runs-on: macos-latest
|
|
||||||
needs: [get-info, build-core, auto-test]
|
|
||||||
if: ${{ always() }}
|
|
||||||
env:
|
|
||||||
OUTPUT_FOLDER: ./build
|
|
||||||
outputs:
|
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Process app name
|
|
||||||
id: process-app-name
|
|
||||||
shell: python3 {0}
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
os.system("echo ::set-output name=bundle-id::org.26f-studio.techmino")
|
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}"))
|
|
||||||
- name: Download core love package
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
|
||||||
- name: Download ColdClear
|
|
||||||
uses: ./.github/actions/get-cc
|
|
||||||
with:
|
|
||||||
platform: macOS
|
|
||||||
dir: ./ColdClear
|
|
||||||
- name: Process ColdClear
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
rm ./ColdClear/universal/libcold_clear.a
|
|
||||||
- name: Build macOS packages
|
|
||||||
id: build-packages
|
|
||||||
uses: 26F-Studio/love-actions-macos-appstore@v1
|
|
||||||
with:
|
|
||||||
app-name: ${{ needs.get-info.outputs.app-name }}
|
|
||||||
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
|
||||||
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
|
||||||
icon-path: ./.github/build/macOS/dev/icon.icns
|
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
|
||||||
libs-path: ./ColdClear/universal/
|
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
|
||||||
version-string: ${{ needs.get-info.outputs.version-string }}
|
|
||||||
output-folder: ${{ env.OUTPUT_FOLDER }}
|
|
||||||
apple-development-base64: ${{ secrets.APPLE_CERT_APPLE_DEVELOPMENT_BASE64 }}
|
|
||||||
apple-development-password: ${{ secrets.APPLE_CERT_APPLE_DEVELOPMENT_PWD }}
|
|
||||||
api-key: ${{ secrets.APPLE_API_KEY }}
|
|
||||||
api-key-id: ${{ secrets.APPLE_API_KEY_ID }}
|
|
||||||
api-issuer-id: ${{ secrets.APPLE_API_ISSUER_ID }}
|
|
||||||
team-id: ${{ secrets.APPLE_DEVELOPER_TEAM_ID }}
|
|
||||||
apple-id: ${{ secrets.APPLE_APPLE_ID }}
|
|
||||||
external-test: true
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_macOS_appstore
|
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/*
|
|
||||||
- name: Upload to WeTransfer
|
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
wget -qO- https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_darwin_amd64.tar.gz | tar xvz
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
build-macos-portable:
|
|
||||||
runs-on: macos-latest
|
|
||||||
needs: [get-info, build-core, auto-test]
|
|
||||||
if: ${{ !always() }}
|
|
||||||
env:
|
|
||||||
OUTPUT_FOLDER: ./build
|
|
||||||
outputs:
|
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Process app name
|
|
||||||
id: process-app-name
|
|
||||||
shell: python3 {0}
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
os.system("echo ::set-output name=bundle-id::org.26f-studio.techmino")
|
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}"))
|
|
||||||
- name: Download core love package
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
|
||||||
- name: Download ColdClear
|
|
||||||
uses: ./.github/actions/get-cc
|
|
||||||
with:
|
|
||||||
platform: macOS
|
|
||||||
dir: ./ColdClear
|
|
||||||
- name: Process ColdClear
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
rm ./ColdClear/universal/libcold_clear.a
|
|
||||||
- name: Build macOS packages
|
|
||||||
id: build-packages
|
|
||||||
uses: 26F-Studio/love-actions-macos-portable@v1
|
|
||||||
with:
|
|
||||||
app-name: ${{ needs.get-info.outputs.app-name }}
|
|
||||||
bundle-id: ${{ steps.process-app-name.outputs.bundle-id }}
|
|
||||||
copyright: "Copyright © 2019-2022 26F-Studio. Some Rights Reserved."
|
|
||||||
icon-path: ./.github/build/macOS/dev/icon.icns
|
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
|
||||||
libs-path: ./ColdClear/universal/
|
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
|
||||||
version-string: ${{ needs.get-info.outputs.version-string }}
|
|
||||||
output-folder: ${{ env.OUTPUT_FOLDER }}
|
|
||||||
account-username: ${{ secrets.APPLE_ACCOUNT_USERNAME }}
|
|
||||||
account-password: ${{ secrets.APPLE_ACCOUNT_PASSWORD }}
|
|
||||||
team-id: "${{ secrets.APPLE_DEVELOPER_TEAM_ID }}"
|
|
||||||
developer-id-application-base64: ${{ secrets.APPLE_CERT_DEVELOPER_ID_APPLICATION }}
|
|
||||||
developer-id-application-password: ${{ secrets.APPLE_CERT_DEVELOPER_ID_APPLICATION_PWD }}
|
|
||||||
developer-id-installer-base64: ${{ secrets.APPLE_CERT_DEVELOPER_ID_INSTALLER }}
|
|
||||||
developer-id-installer-password: ${{ secrets.APPLE_CERT_DEVELOPER_ID_INSTALLER_PWD }}
|
|
||||||
dmg-background-path: ./.github/build/macOS/dev/dmg.png
|
|
||||||
dmg-icon-position: "239 203"
|
|
||||||
dmg-icon-size: "100"
|
|
||||||
dmg-link-position: "565 203"
|
|
||||||
dmg-text-size: "12"
|
|
||||||
dmg-volume-icon-path: ./.github/build/macOS/dev/dmg.icns
|
|
||||||
dmg-volume-name: ${{ steps.process-app-name.outputs.product-name }}
|
|
||||||
dmg-window-position: "200 120"
|
|
||||||
dmg-window-size: "800 500"
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_macOS_portable
|
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/*
|
|
||||||
- name: Upload to WeTransfer
|
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
wget -qO- https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_darwin_amd64.tar.gz | tar xvz
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
build-windows:
|
|
||||||
runs-on: windows-latest
|
|
||||||
needs: [get-info, build-core, auto-test]
|
|
||||||
if: ${{ !always() }}
|
|
||||||
env:
|
|
||||||
OUTPUT_FOLDER: ./build
|
|
||||||
outputs:
|
|
||||||
download-url: ${{ steps.transfer.outputs.download-url }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Process app name
|
|
||||||
id: process-app-name
|
|
||||||
shell: python3 {0}
|
|
||||||
run: |
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
os.system("echo ::set-output name=product-name::" + re.sub(r"[^A-Za-z0-9]+", "_", "${{ needs.get-info.outputs.app-name }}"))
|
|
||||||
- name: Download core love package
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
|
||||||
- name: Build Windows packages
|
|
||||||
id: build-packages
|
|
||||||
uses: 26F-Studio/love-actions-windows@v1
|
|
||||||
with:
|
|
||||||
icon-path: ./.github/build/windows/dev/icon.ico
|
|
||||||
rc-path: ./.github/build/windows/dev/template.rc
|
|
||||||
love-package: ${{ env.CORE_LOVE_PACKAGE_PATH }}
|
|
||||||
product-name: ${{ steps.process-app-name.outputs.product-name }}
|
|
||||||
version-string: ${{ needs.get-info.outputs.version-string }}
|
|
||||||
output-folder: ${{ env.OUTPUT_FOLDER }}
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ needs.get-info.outputs.base-name }}_Windows
|
|
||||||
path: ${{ env.OUTPUT_FOLDER }}/*
|
|
||||||
- name: Get transfer
|
|
||||||
env:
|
|
||||||
TEMP_PATH: ./temp.zip
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
curl -L --retry 5 https://github.com/Mikubill/transfer/releases/download/v0.4.17/transfer_0.4.17_windows_amd64.zip -o ${{ env.TEMP_PATH }}
|
|
||||||
7z x ${{ env.TEMP_PATH }} -o./
|
|
||||||
rm ${{ env.TEMP_PATH }}
|
|
||||||
- name: Upload to WeTransfer
|
|
||||||
id: transfer
|
|
||||||
run: |
|
|
||||||
./transfer wet -s -p 16 --no-progress ${{ steps.build-packages.outputs.package-paths }} 2>&1>./wetransfer.log
|
|
||||||
echo "::set-output name=download-url::$(cat ./wetransfer.log | grep https | cut -f3 -d" ")"
|
|
||||||
post-build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ !always() }}
|
|
||||||
needs:
|
|
||||||
[
|
|
||||||
get-info,
|
|
||||||
auto-test,
|
|
||||||
build-core,
|
|
||||||
build-android,
|
|
||||||
build-ios,
|
|
||||||
build-linux,
|
|
||||||
build-macos-appstore,
|
|
||||||
build-macos-portable,
|
|
||||||
build-windows,
|
|
||||||
]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Cleanup
|
|
||||||
uses: geekyeggo/delete-artifact@v1
|
|
||||||
with:
|
|
||||||
name: ${{ env.CORE_LOVE_ARTIFACT_NAME }}
|
|
||||||
- name: Send Discord message
|
|
||||||
uses: Sniddl/discord-commits@v1.3
|
|
||||||
with:
|
|
||||||
webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
|
||||||
message: "Github Actions for **${{ github.repository }}**."
|
|
||||||
embed: '{
|
|
||||||
"author":{
|
|
||||||
"name":"${{ needs.get-info.outputs.app-name }} [Development]",
|
|
||||||
"url":"https://github.com/${{ github.repository }}"
|
|
||||||
},
|
|
||||||
"title":"${{ needs.get-info.outputs.app-name }} (${{ needs.get-info.outputs.version-name }}) Build Result",
|
|
||||||
"description": "CI triggered at ${{ needs.get-info.outputs.commit-hash }}",
|
|
||||||
"url":"https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
|
|
||||||
"thumbnail":{
|
|
||||||
"url":"https://raw.githubusercontent.com/${{ github.repository }}/main/.github/build/linux/dev/icon.png"
|
|
||||||
},
|
|
||||||
"color":36863,
|
|
||||||
"fields":[
|
|
||||||
{"name":"Version","value":"${{ needs.get-info.outputs.version-string }}","inline": true},
|
|
||||||
{"name":"Package Name","value":"${{ needs.get-info.outputs.base-name }}","inline": true},
|
|
||||||
{"name":"Status","value":"**Automatic Test:** ${{ needs.auto-test.result }}\n**Core:** ${{ needs.build-core.result }}\n**Android:** ${{ needs.build-android.result }}\n**iOS:** ${{ needs.build-ios.result }}\n**Linux:** ${{ needs.build-linux.result }}\n**macOS App Store:** ${{ needs.build-macos-appstore.result }}\n**macOS portable:** ${{ needs.build-macos-portable.result }}\n**Windows:** ${{ needs.build-windows.result }}"},
|
|
||||||
{"name":"Download Links","value":"**Core:** ${{ needs.build-core.outputs.download-url}}\n**Android:** ${{ needs.build-android.outputs.download-url }}\n**iOS:** ${{ needs.build-ios.outputs.download-url }}\n**Linux:** ${{ needs.build-linux.outputs.download-url }}\n**macOS App Store:** ${{ needs.build-macos-appstore.outputs.download-url }}\n**macOS portable:** ${{ needs.build-macos-portable.outputs.download-url }}\n**Windows:** ${{ needs.build-windows.outputs.download-url}}"}
|
|
||||||
]
|
|
||||||
}'
|
|
||||||
Reference in New Issue
Block a user