Ci ios (#399)
*Bunch of ci-ios thing* Co-authored-by: Imple Lee <80144331+ImpleLee@users.noreply.github.com> Co-authored-by: Trebor-Huang <2300936257@qq.com> Co-authored-by: Trebor Huang <41145779+Trebor-Huang@users.noreply.github.com> Co-authored-by: YunyushuLiu <kunluntree@qq.com> Co-authored-by: MrZ626 <1046101471@qq.com> Co-authored-by: 梦飞翔 <1149761294@qq.com>
This commit is contained in:
4
.github/actions/build-android/action.yml
vendored
4
.github/actions/build-android/action.yml
vendored
@@ -3,7 +3,7 @@ description: 'build Android package'
|
||||
inputs:
|
||||
type:
|
||||
required: true
|
||||
code:
|
||||
apkCode:
|
||||
required: true
|
||||
name:
|
||||
required: true
|
||||
@@ -63,7 +63,7 @@ runs:
|
||||
shell: bash
|
||||
run: |
|
||||
echo "${{ inputs.SIGNING_KEY }}" | base64 -d > love-android/app/android.keystore
|
||||
python3 .github/workflows/updateVersion.py -T Android${{ inputs.type }} -C ${{ inputs.code }} -N ${{ inputs.name }} -S ${{ inputs.KEY_STORE_PASSWORD }} -A ${{ inputs.ALIAS }} -K ${{ inputs.KEY_PASSWORD }}
|
||||
python3 .github/workflows/updateVersion.py -T Android${{ inputs.type }} -C ${{ inputs.apkCode }} -N ${{ inputs.name }} -S ${{ inputs.KEY_STORE_PASSWORD }} -A ${{ inputs.ALIAS }} -K ${{ inputs.KEY_PASSWORD }}
|
||||
chmod 777 love-android/gradlew
|
||||
cd love-android/
|
||||
./gradlew assembleRelease
|
||||
|
||||
63
.github/actions/build-ios/action.yml
vendored
63
.github/actions/build-ios/action.yml
vendored
@@ -31,6 +31,8 @@ inputs:
|
||||
required: true
|
||||
APPLE_KEY_CONTENT:
|
||||
required: true
|
||||
PROJECT_BUILD_NUMBER:
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
@@ -45,34 +47,6 @@ runs:
|
||||
uses: ./.github/actions/get-cc
|
||||
with:
|
||||
arch: iOS
|
||||
# - name: Create and config keychain
|
||||
# shell: bash
|
||||
# run: |
|
||||
# security create-keychain -p "" build.keychain
|
||||
# security list-keychains -s build.keychain
|
||||
# security default-keychain -s build.keychain
|
||||
# security unlock-keychain -p "" build.keychain
|
||||
# security set-keychain-settings
|
||||
# security import <(echo ${{inputs.IOS_CERTIFICATE}} | base64 --decode) \
|
||||
# -f pkcs12 \
|
||||
# -k build.keychain \
|
||||
# -P ${{inputs.IOS_CERTIFICATE_PWD}} \
|
||||
# -T /usr/bin/codesign
|
||||
# security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain
|
||||
# - name: Import provisioning profile
|
||||
# shell: bash
|
||||
# run: |
|
||||
# mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
# echo "${{inputs.IOS_PROFILE}}" | base64 --decode > \
|
||||
# ~/Library/MobileDevice/Provisioning\ Profiles/dist.mobileprovision
|
||||
# echo "${{inputs.IOS_PROFILE_DEV}}" | base64 --decode > \
|
||||
# ~/Library/MobileDevice/Provisioning\ Profiles/dev.mobileprovision
|
||||
# - name: Sign and chmod CCloader
|
||||
# shell: bash
|
||||
# run: |
|
||||
# security unlock-keychain -p "" build.keychain
|
||||
# codesign -f -s "${{inputs.IOS_CERTIFICATE_ID}}" ./CCloader.dylib
|
||||
# chmod +x ./CCloader.dylib
|
||||
- name: Update source codes
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -100,31 +74,8 @@ runs:
|
||||
APPLE_KEY_ID: '${{ inputs.APPLE_KEY_ID }}'
|
||||
APPLE_ISSUER_ID: '${{ inputs.APPLE_ISSUER_ID }}'
|
||||
APPLE_KEY_CONTENT: '${{ inputs.APPLE_KEY_CONTENT }}'
|
||||
# - name: Build project
|
||||
# shell: bash
|
||||
# run: |
|
||||
# xcodebuild -project Techmino-iOS/platform/xcode/Techmino.xcodeproj \
|
||||
# -scheme Techmino \
|
||||
# -configuration Release \
|
||||
# -quiet \
|
||||
# CONFIGURATION_BUILD_DIR=Build
|
||||
# - name: Arrange build
|
||||
# shell: bash
|
||||
# run: |
|
||||
# mv Techmino-iOS/platform/xcode/Build/Techmino.app ./
|
||||
# - name: Archive project
|
||||
# shell: bash
|
||||
# run: |
|
||||
# xcodebuild -project Techmino-iOS/platform/xcode/Techmino.xcodeproj \
|
||||
# -scheme Techmino \
|
||||
# -configuration Distribution \
|
||||
# -archivePath Techmino-iOS/Archive
|
||||
# -quiet \
|
||||
# archive
|
||||
# - name: Export archive
|
||||
# shell: bash
|
||||
# run: |
|
||||
# xcodebuild -exportArchive \
|
||||
# -archivePath Techmino-iOS/Archive \
|
||||
# -exportOptionsPlist Techmino-iOS/ExportOptions.plist \
|
||||
# Techmino-iOS/Export
|
||||
PROJECT_BUILD_NUMBER: '${{ inputs.PROJECT_BUILD_NUMBER }}'
|
||||
- name: Move ipa
|
||||
shell: bash
|
||||
run: |
|
||||
mv Techmino-iOS/platform/xcode/Techmino.ipa Techmino.ipa
|
||||
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -11,6 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
name: ${{ steps.actual-get-info.outputs.name }}
|
||||
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
||||
code: ${{ steps.actual-get-info.outputs.code }}
|
||||
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||
steps:
|
||||
@@ -22,6 +23,7 @@ jobs:
|
||||
id: actual-get-info
|
||||
run: |
|
||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||
|
||||
@@ -74,7 +76,7 @@ jobs:
|
||||
- uses: ./.github/actions/build-android
|
||||
with:
|
||||
type: Snapshot
|
||||
code: ${{ needs.get-info.outputs.code }}
|
||||
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
file-path: Techmino_Snapshot.apk
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
@@ -136,3 +138,9 @@ jobs:
|
||||
APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}'
|
||||
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}'
|
||||
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
|
||||
PROJECT_BUILD_NUMBER: '${{ needs.get-info.outputs.code }}.${{ github.run_number }}'
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_iOS
|
||||
path: Techmino.ipa
|
||||
|
||||
5
.github/workflows/getVersion.lua
vendored
5
.github/workflows/getVersion.lua
vendored
@@ -1,6 +1,9 @@
|
||||
if arg[1]=="-code"then
|
||||
if arg[1]=="-apkCode"then
|
||||
local code=require"version".apkCode
|
||||
print(code)
|
||||
elseif arg[1]=="-code"then
|
||||
local str=require"version".code
|
||||
print(str)
|
||||
elseif arg[1]=="-name"then
|
||||
local str=require"version".string:gsub("@DEV","")
|
||||
print(str)
|
||||
|
||||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -10,6 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
name: ${{ steps.actual-get-info.outputs.name }}
|
||||
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
||||
code: ${{ steps.actual-get-info.outputs.code }}
|
||||
release: ${{ steps.actual-get-info.outputs.release }}
|
||||
updateTitle: ${{ steps.actual-get-info.outputs.updateTitle }}
|
||||
@@ -23,6 +24,7 @@ jobs:
|
||||
id: actual-get-info
|
||||
run: |
|
||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||
echo "::set-output name=release::$(lua .github/workflows/getVersion.lua -release)"
|
||||
echo "::set-output name=updateTitle::$(lua .github/workflows/getVersion.lua -updateTitle)"
|
||||
@@ -103,7 +105,7 @@ jobs:
|
||||
- uses: ./.github/actions/build-android
|
||||
with:
|
||||
type: Release
|
||||
code: ${{ needs.get-info.outputs.code }}
|
||||
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
file-path: Techmino.a${{ needs.get-info.outputs.release }}.apk
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
@@ -130,7 +132,7 @@ jobs:
|
||||
- uses: ./.github/actions/build-android
|
||||
with:
|
||||
type: Release
|
||||
code: ${{ needs.get-info.outputs.code }}
|
||||
apkCode: ${{ needs.get-info.outputs.apkCode }}
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
file-path: Techmino.a${{ needs.get-info.outputs.release }}.mini.apk
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
|
||||
Reference in New Issue
Block a user