Ci ios (#395)
* merge get-cc-url into get-version * add `get-cc` * remove `apt update` * rename `get-version` -> `get-info` * rm unnecessary file * - Add support for ios - Fix missing top folder for macos * - Fix directory names * - Fix with binary r/w * iOS的plist文件先转换为明文 * add IOS * 整合新action * Finishing touch * Update action.yml * Test chmod * - Xcode build test * - Build with default keychain * - Test iOS only * - Use macos-11 * - Change keychain operations' sequence * - Allow provisioning updates * - Set build directory * - Specify build path * - Pack bare app * - Add quiet option * 测试:输出touchrelease位置 * - Test with ad hoc cert * - Fix wrong variable * - Use Release instead of Distribution * - Chmod CCloader to add execute permission * 继续测试ios触屏问题 * 继续测试ios触屏问题 * - Use macos latest - Re-enable other runs * - Sign CCloader after build * - Remove redundant inputs in build.yml * - Install test * - Export test * - install test * - Try fastlane * - Use builtin ruby * - CI Test * - Update python script to fix ios versioning * - Use static lib * - Test static cc * - Fix locations * Update readme.md 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:
130
.github/actions/build-ios/action.yml
vendored
Normal file
130
.github/actions/build-ios/action.yml
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
name: 'build iOS'
|
||||
description: 'build iOS package'
|
||||
inputs:
|
||||
name:
|
||||
required: true
|
||||
APP_STORE_CONNECT_TEAM_ID:
|
||||
required: true
|
||||
DEVELOPER_APP_ID:
|
||||
required: true
|
||||
DEVELOPER_APP_IDENTIFIER:
|
||||
required: true
|
||||
DEVELOPER_PORTAL_TEAM_ID:
|
||||
required: true
|
||||
FASTLANE_APPLE_ID:
|
||||
required: true
|
||||
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD:
|
||||
required: true
|
||||
MATCH_PASSWORD:
|
||||
required: true
|
||||
GIT_AUTHORIZATION:
|
||||
required: true
|
||||
PROVISIONING_PROFILE_SPECIFIER:
|
||||
required: true
|
||||
TEMP_KEYCHAIN_PASSWORD:
|
||||
required: true
|
||||
TEMP_KEYCHAIN_USER:
|
||||
required: true
|
||||
APPLE_KEY_ID:
|
||||
required: true
|
||||
APPLE_ISSUER_ID:
|
||||
required: true
|
||||
APPLE_KEY_CONTENT:
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: ./.github/actions/build-love
|
||||
- name: Checkout source codes
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: '26F-Studio/Techmino-iOS'
|
||||
path: 'Techmino-iOS'
|
||||
- name: Download CCloader
|
||||
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: |
|
||||
mv Techmino.love Techmino-iOS/platform/xcode
|
||||
mv libcold_clear.a Techmino-iOS/platform/xcode
|
||||
mv libCCloader.a Techmino-iOS/platform/xcode
|
||||
python3 .github/workflows/updateVersion.py -T iOS -N ${{ inputs.name }}
|
||||
- name: Run fastlane
|
||||
uses: maierj/fastlane-action@v2.0.1
|
||||
with:
|
||||
lane: 'alpha'
|
||||
subdirectory: 'Techmino-iOS/platform/xcode'
|
||||
env:
|
||||
APP_STORE_CONNECT_TEAM_ID: '${{ inputs.APP_STORE_CONNECT_TEAM_ID }}'
|
||||
DEVELOPER_APP_ID: '${{ inputs.DEVELOPER_APP_ID }}'
|
||||
DEVELOPER_APP_IDENTIFIER: '${{ inputs.DEVELOPER_APP_IDENTIFIER }}'
|
||||
DEVELOPER_PORTAL_TEAM_ID: '${{ inputs.DEVELOPER_PORTAL_TEAM_ID }}'
|
||||
FASTLANE_APPLE_ID: '${{ inputs.FASTLANE_APPLE_ID }}'
|
||||
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ inputs.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}'
|
||||
MATCH_PASSWORD: '${{ inputs.MATCH_PASSWORD }}'
|
||||
GIT_AUTHORIZATION: '${{ inputs.GIT_AUTHORIZATION }}'
|
||||
PROVISIONING_PROFILE_SPECIFIER: '${{ inputs.PROVISIONING_PROFILE_SPECIFIER }}'
|
||||
TEMP_KEYCHAIN_PASSWORD: '${{ inputs.TEMP_KEYCHAIN_PASSWORD }}'
|
||||
TEMP_KEYCHAIN_USER: '${{ inputs.TEMP_KEYCHAIN_USER }}'
|
||||
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
|
||||
5
.github/actions/build-macos/action.yml
vendored
5
.github/actions/build-macos/action.yml
vendored
@@ -15,10 +15,12 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- uses: ./.github/actions/build-love
|
||||
|
||||
- name: Download template
|
||||
uses: ./.github/actions/get-unzip
|
||||
with:
|
||||
url: https://github.com/26F-Studio/Techmino/releases/download/v0.15.1/Techmino.app.zip
|
||||
url: https://github.com/26F-Studio/Techmino-CI-template/releases/download/1.0/macos.app.zip
|
||||
|
||||
- name: Download ColdClear
|
||||
uses: ./.github/actions/get-cc
|
||||
with:
|
||||
@@ -44,4 +46,3 @@ runs:
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k Techminohaowan build.keychain
|
||||
/usr/bin/codesign --force --deep -s ${{ inputs.MACOS_CERTIFICATE_ID }} Techmino.app -v
|
||||
security delete-keychain build.keychain
|
||||
|
||||
|
||||
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@@ -110,3 +110,29 @@ jobs:
|
||||
with:
|
||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_macOS
|
||||
path: Techmino.zip
|
||||
|
||||
build-iOS:
|
||||
runs-on: macos-latest
|
||||
needs: get-info
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./.github/actions/snapshot-update
|
||||
with:
|
||||
commit: ${{ needs.get-info.outputs.commit }}
|
||||
- uses: ./.github/actions/build-ios
|
||||
with:
|
||||
name: ${{ needs.get-info.outputs.name }}
|
||||
APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}'
|
||||
DEVELOPER_APP_ID: '${{ secrets.DEVELOPER_APP_ID }}'
|
||||
DEVELOPER_APP_IDENTIFIER: '${{ secrets.DEVELOPER_APP_IDENTIFIER }}'
|
||||
DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}'
|
||||
FASTLANE_APPLE_ID: '${{ secrets.FASTLANE_APPLE_ID }}'
|
||||
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}'
|
||||
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}'
|
||||
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'
|
||||
PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}'
|
||||
TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}'
|
||||
TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}'
|
||||
APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}'
|
||||
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}'
|
||||
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
|
||||
|
||||
11
.github/workflows/updateVersion.py
vendored
11
.github/workflows/updateVersion.py
vendored
@@ -1,4 +1,5 @@
|
||||
import argparse
|
||||
import re
|
||||
|
||||
def updateConf(): #更新存档位置
|
||||
with open('conf.lua', 'r+', encoding='utf-8') as file:
|
||||
@@ -32,6 +33,14 @@ def updateMacOS(args): #更新macOS打包信息
|
||||
with open('./Techmino.app/Contents/info.plist', 'w+', encoding='utf-8') as file:
|
||||
file.write(data)
|
||||
|
||||
def updateIOS(args): #更新iOS打包信息
|
||||
with open('./Techmino-iOS/platform/xcode/Techmino.xcodeproj/project.pbxproj', 'r') as file:
|
||||
data = file.read()
|
||||
data = data.replace('__VERSION__', re.search(r'([0-9]+\.[0-9]+\.[0-9]+)', args.Name, re.I).group(1))
|
||||
|
||||
with open('./Techmino-iOS/platform/xcode/Techmino.xcodeproj/project.pbxproj', 'w') as file:
|
||||
file.write(data)
|
||||
|
||||
def updateWindows(args): #更新Windows打包信息
|
||||
Version = (args.Name).replace('V', '')
|
||||
FileVersion = (f"{Version.replace('.', ',')},0")
|
||||
@@ -91,6 +100,8 @@ if __name__ == '__main__':
|
||||
updateWindows(args)
|
||||
elif args.Type == 'macOS':
|
||||
updateMacOS(args)
|
||||
elif args.Type == 'iOS':
|
||||
updateIOS(args)
|
||||
elif args.Type == 'AndroidRelease':
|
||||
updateAndroid(args, 'Release')
|
||||
elif args.Type == 'AndroidSnapshot':
|
||||
|
||||
@@ -95,7 +95,7 @@ function BOT.new(P,data)
|
||||
P:setHold(1)
|
||||
end
|
||||
|
||||
local cc=REQUIRE"CCloader"
|
||||
local cc=cc or REQUIRE"CCloader"
|
||||
if not cc then
|
||||
data.type=false
|
||||
return BOT.new(P,data)
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# Techmino
|
||||
|
||||
[](https://github.com/26F-Studio/Techmino/actions)
|
||||

|
||||
|
||||
《Techmino:方块研究所》——Github & Gitee 官方仓库 Official Repository
|
||||
|
||||
集合各种现代方块规则,更多玩法,全新体验。
|
||||
|
||||
Reference in New Issue
Block a user