-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit aa031da
Showing
83 changed files
with
20,790 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": ["taro/react"], | ||
"rules": { | ||
"react/jsx-uses-react": "off", | ||
"react/react-in-jsx-scope": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
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 | ||
echo $SIGNING_CERTIFICATE_P12_DATA | base64 --decode > signingCertificate.p12 | ||
security import signingCertificate.p12 \ | ||
-f pkcs12 \ | ||
-k build.keychain \ | ||
-P $SIGNING_CERTIFICATE_PASSWORD \ | ||
-T /usr/bin/codesign | ||
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles | ||
echo "$PROVISIONING_PROFILE_DATA" | base64 --decode > ~/Library/MobileDevice/Provisioning\ Profiles/profile.mobileprovision |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# 工作流名称 | ||
name: Assemble Android Debug | ||
|
||
# 触发工作流程的事件 | ||
on: | ||
push: | ||
branches: [ main ] | ||
tags: [ v* ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
workflow_dispatch: | ||
|
||
# 工作流环境变量 | ||
env: | ||
# 应用的application_id | ||
APP_ID: com.tarodemo | ||
# 应用名称 | ||
APP_NAME: Taro Demo | ||
# 打包类型 | ||
BUILD_TYPE: debug | ||
# 版本名称 | ||
VERSION_NAME: 1.0.0 | ||
# 版本号 | ||
VERSION_CODE: 10 | ||
# 密钥库文件 | ||
KEYSTORE_FILE: debug.keystore | ||
# 密钥库口令 | ||
KEYSTORE_PASSWORD: android | ||
# 密钥库别名 | ||
KEYSTORE_KEY_ALIAS: androiddebugkey | ||
# 密钥库别名口令 | ||
KEYSTORE_KEY_PASSWORD: android | ||
|
||
# 工作流作业 | ||
jobs: | ||
assemble: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- name: Cache Gradle | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: gradle-cache | ||
with: | ||
path: ~/.gradle | ||
key: ${{ runner.os }}-gradle | ||
restore-keys: | | ||
${{ runner.os }}-gradle | ||
- name: Assemble Android ${{ env.BUILD_TYPE }} | ||
run: | | ||
sudo apt install -y ruby-bundler | ||
cd android | ||
bundle update | ||
bundle exec fastlane assemble | ||
env: | ||
KEYSTORE_FILE: ${{ github.workspace }}/android/app/${{ env.KEYSTORE_FILE }} | ||
NODE_PATH: ${{ github.workspace }}/node_modules/.pnpm/node_modules:$NODE_PATH | ||
- name: Upload Android Products | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: app-${{ env.BUILD_TYPE }} | ||
path: ${{ github.workspace }}/android/app/build/outputs/apk/${{ env.BUILD_TYPE }}/app-${{ env.BUILD_TYPE }}.apk | ||
- name: Upload release assets | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
prerelease: ${{ contains(github.ref, 'beta') }} | ||
files: | | ||
android/app/build/outputs/apk/${{ env.BUILD_TYPE }}/app-${{ env.BUILD_TYPE }}.apk | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# 工作流名称 | ||
name: Assemble Android Release | ||
|
||
# 触发工作流程的事件 | ||
on: | ||
push: | ||
branches: [ main ] | ||
tags: [ v* ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
workflow_dispatch: | ||
|
||
# 工作流环境变量 | ||
env: | ||
# 应用的application_id | ||
APP_ID: com.tarodemo | ||
# 应用名称 | ||
APP_NAME: Taro Demo | ||
# 打包类型 | ||
BUILD_TYPE: release | ||
# 版本名称 | ||
VERSION_NAME: 1.0.0 | ||
# 版本号 | ||
VERSION_CODE: 10 | ||
# 密钥库文件 | ||
KEYSTORE_FILE: debug.keystore | ||
# 密钥库口令 | ||
KEYSTORE_PASSWORD: android | ||
# 密钥库别名 | ||
KEYSTORE_KEY_ALIAS: androiddebugkey | ||
# 密钥库别名口令 | ||
KEYSTORE_KEY_PASSWORD: android | ||
|
||
# 工作流作业 | ||
jobs: | ||
assemble: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- name: Cache Gradle | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: gradle-cache | ||
with: | ||
path: ~/.gradle | ||
key: ${{ runner.os }}-gradle | ||
restore-keys: | | ||
${{ runner.os }}-gradle | ||
- name: Assemble Android ${{ env.BUILD_TYPE }} | ||
run: | | ||
sudo apt install -y ruby-bundler | ||
cd android | ||
bundle update | ||
bundle exec fastlane assemble | ||
env: | ||
KEYSTORE_FILE: ${{ github.workspace }}/android/app/${{ env.KEYSTORE_FILE }} | ||
NODE_PATH: ${{ github.workspace }}/node_modules/.pnpm/node_modules:$NODE_PATH | ||
- name: Upload Android Products | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: app-${{ env.BUILD_TYPE }} | ||
path: ${{ github.workspace }}/android/app/build/outputs/apk/${{ env.BUILD_TYPE }}/app-${{ env.BUILD_TYPE }}.apk | ||
- name: Upload release assets | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
prerelease: ${{ contains(github.ref, 'beta') }} | ||
files: | | ||
android/app/build/outputs/apk/${{ env.BUILD_TYPE }}/app-${{ env.BUILD_TYPE }}.apk | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# 工作流名称 | ||
name: Assemble Ios Debug | ||
|
||
# 触发工作流程的事件 | ||
on: | ||
push: | ||
branches: [ main ] | ||
tags: [ v* ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
workflow_dispatch: | ||
|
||
# 工作流环境变量 | ||
env: | ||
# 应用的application_id | ||
APP_ID: ${{secrets.APP_ID}} | ||
APP_NAME: Taro Demo | ||
VERSION_NUMBER: 1.0.0 | ||
BUILD_TYPE: debug | ||
TEAM_ID: ${{secrets.TEAM_ID}} | ||
PROVISIONING_PROFILE_SPECIFIER: ${{secrets.DEBUG_PROVISIONING_PROFILE_SPECIFIER}} | ||
CODE_SIGN_IDENTITY: Apple Development | ||
SIGNING_CERTIFICATE_P12_DATA: ${{secrets.DEBUG_SIGNING_CERTIFICATE_P12_DATA}} | ||
SIGNING_CERTIFICATE_PASSWORD: ${{secrets.DEBUG_SIGNING_CERTIFICATE_PASSWORD}} | ||
PROVISIONING_PROFILE_DATA: ${{secrets.DEBUG_PROVISIONING_PROFILE_DATA}} | ||
|
||
jobs: | ||
assemble: | ||
runs-on: macos-13 | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@v2 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- name: Cache Pods | ||
uses: actions/cache@v2 | ||
with: | ||
path: ios/Pods | ||
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pods- | ||
- name: Install pods | ||
run: cd ios && pod update --no-repo-update | ||
- name: Import signing certificate | ||
env: | ||
SIGNING_CERTIFICATE_P12_DATA: ${{ env.SIGNING_CERTIFICATE_P12_DATA }} | ||
SIGNING_CERTIFICATE_PASSWORD: ${{ env.SIGNING_CERTIFICATE_PASSWORD }} | ||
run: | | ||
exec .github/scripts/import-certificate.sh | ||
- name: Import provisioning profile | ||
env: | ||
PROVISIONING_PROFILE_DATA: ${{ env.PROVISIONING_PROFILE_DATA }} | ||
run: | | ||
exec .github/scripts/import-profile.sh | ||
- name: Build app | ||
env: | ||
FL_APP_IDENTIFIER: ${{ env.APP_ID }} | ||
FL_UPDATE_PLIST_DISPLAY_NAME: ${{ env.APP_NAME }} | ||
FL_UPDATE_PLIST_PATH: taroDemo/Info.plist | ||
FL_VERSION_NUMBER_VERSION_NUMBER: ${{ env.VERSION_NUMBER }} | ||
FL_BUILD_NUMBER_BUILD_NUMBER: ${{ env.BUILD_NUMBER }} | ||
FL_CODE_SIGN_IDENTITY: ${{ env.CODE_SIGN_IDENTITY }} | ||
FL_PROVISIONING_PROFILE_SPECIFIER: ${{ env.PROVISIONING_PROFILE_SPECIFIER }} | ||
FASTLANE_TEAM_ID: ${{ env.TEAM_ID }} | ||
NODE_PATH: ${{ github.workspace }}/node_modules/.pnpm/node_modules:$NODE_PATH | ||
run: | | ||
cd ios | ||
bundle update | ||
bundle exec fastlane build_dev | ||
- name: Upload Ios Products | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: app-${{ env.BUILD_TYPE }} | ||
path: | | ||
${{ github.workspace }}/ios/taroDemo.ipa | ||
${{ github.workspace }}/ios/taroDemo.app.dSYM.zip | ||
- name: Rename release assets | ||
run: | | ||
mv ios/taroDemo.ipa ios/app-${{ env.BUILD_TYPE }}.ipa | ||
mv ios/taroDemo.app.dSYM.zip ios/app-${{ env.BUILD_TYPE }}.app.dSYM.zip | ||
- name: Upload release assets | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
prerelease: ${{ contains(github.ref, 'beta') }} | ||
files: | | ||
ios/app-${{ env.BUILD_TYPE }}.ipa | ||
ios/app-${{ env.BUILD_TYPE }}.app.dSYM.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.