mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
Compare commits
10 commits
f1fe297c75
...
9d1f87c156
Author | SHA1 | Date | |
---|---|---|---|
|
9d1f87c156 | ||
|
9756b7134e | ||
|
f33073f42b | ||
|
1f62b8567a | ||
|
eeb9500935 | ||
|
41b7fd21c7 | ||
|
5956912a65 | ||
|
2dcfd87d4e | ||
|
8b8c5d8409 | ||
|
551cd42c5a |
3 changed files with 92 additions and 30 deletions
55
.github/workflows/build_apk.yml
vendored
55
.github/workflows/build_apk.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
|||
build:
|
||||
name: Build .ipa
|
||||
runs-on: macos-11
|
||||
timeout-minutes: 15
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
@ -31,17 +31,37 @@ jobs:
|
|||
distribution: "zulu"
|
||||
java-version: "11"
|
||||
|
||||
- name: Install Apple Certificate
|
||||
uses: apple-actions/import-codesign-certs@v1
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.APP_STORE_P12 }}
|
||||
p12-password: ${{ secrets.APP_STORE_P12_PASSWORD }}
|
||||
- name: Install the provisioning profile
|
||||
- name: Install the Apple certificate and provisioning profile
|
||||
env:
|
||||
APP_STORE_P12: ${{ secrets.APP_STORE_P12 }}
|
||||
APP_STORE_P12_PASSWORD: ${{ secrets.APP_STORE_P12_PASSWORD }}
|
||||
APP_STORE_PROVISION_PROD: ${{ secrets.APP_STORE_PROVISION_PROD }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||
run: |
|
||||
PROVISION_CERT_PATH=$RUNNER_TEMP/m3_lightmeter_provision.mobileprovision
|
||||
bash .github/scripts/restore_from_base64.sh "${{ secrets.APP_STORE_PROVISION_PROD }}" $PROVISION_CERT_PATH
|
||||
mkdir -p ~/Library/MobileDevice\ Profiles
|
||||
cp $PROVISION_CERT_PATH ~/Library/MobileDevice\ Profiles
|
||||
# create variables
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
PROVISION_PATH=$RUNNER_TEMP/build_provision.mobileprovision
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
|
||||
# import certificate and provisioning profile from secrets
|
||||
echo -n "$APP_STORE_P12" | base64 --decode -o $CERTIFICATE_PATH
|
||||
echo -n "$APP_STORE_PROVISION_PROD" | base64 --decode -o $PROVISION_PATH
|
||||
|
||||
# create temporary keychain
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
|
||||
# import certificate to keychain
|
||||
security import $CERTIFICATE_PATH -P "$APP_STORE_P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
|
||||
# apply provisioning profile
|
||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
cp $PROVISION_PATH ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
|
||||
- name: Restore ios/Runner/ExportOptions.plist
|
||||
run: bash .github/scripts/restore_from_base64.sh "${{ secrets.APP_STORE_EXPORT_OPTIONS }}" "ios/Runner/ExportOptions.plist"
|
||||
|
||||
- name: Restore firebase_options.dart
|
||||
run: bash .github/scripts/restore_from_base64.sh "${{ secrets.FIREBASE_OPTIONS }}" "lib/firebase_options.dart"
|
||||
|
@ -59,10 +79,21 @@ jobs:
|
|||
flutter pub run intl_utils:generate
|
||||
|
||||
- name: Build .ipa
|
||||
run: flutter build ipa --release --flavor $FLAVOR -t lib/main_$FLAVOR.dart
|
||||
run: |
|
||||
flutter build ipa \
|
||||
--release \
|
||||
--flavor $FLAVOR \
|
||||
--target lib/main_$FLAVOR.dart \
|
||||
--export-options-plist=ios/Runner/ExportOptions.plist
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: m3_lightmeter_$FLAVOR_ipa
|
||||
path: build/ios/ipa/lightmeter.ipa
|
||||
|
||||
- name: Clean up keychain and provisioning profile
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||
rm ~/Library/MobileDevice/Provisioning\ Profiles/build_provision.mobileprovision
|
||||
|
|
55
.github/workflows/build_ipa.yml
vendored
55
.github/workflows/build_ipa.yml
vendored
|
@ -15,7 +15,7 @@ jobs:
|
|||
build:
|
||||
name: Build .ipa
|
||||
runs-on: macos-11
|
||||
timeout-minutes: 15
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
|
@ -31,17 +31,37 @@ jobs:
|
|||
distribution: "zulu"
|
||||
java-version: "11"
|
||||
|
||||
- name: Install Apple Certificate
|
||||
uses: apple-actions/import-codesign-certs@v1
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.APP_STORE_P12 }}
|
||||
p12-password: ${{ secrets.APP_STORE_P12_PASSWORD }}
|
||||
- name: Install the provisioning profile
|
||||
- name: Install the Apple certificate and provisioning profile
|
||||
env:
|
||||
APP_STORE_P12: ${{ secrets.APP_STORE_P12 }}
|
||||
APP_STORE_P12_PASSWORD: ${{ secrets.APP_STORE_P12_PASSWORD }}
|
||||
APP_STORE_PROVISION_PROD: ${{ secrets.APP_STORE_PROVISION_PROD }}
|
||||
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
|
||||
run: |
|
||||
PROVISION_CERT_PATH=$RUNNER_TEMP/m3_lightmeter_provision.mobileprovision
|
||||
bash .github/scripts/restore_from_base64.sh "${{ secrets.APP_STORE_PROVISION_PROD }}" $PROVISION_CERT_PATH
|
||||
mkdir -p ~/Library/MobileDevice\ Profiles
|
||||
cp $PROVISION_CERT_PATH ~/Library/MobileDevice\ Profiles
|
||||
# create variables
|
||||
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
|
||||
PROVISION_PATH=$RUNNER_TEMP/build_provision.mobileprovision
|
||||
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
|
||||
|
||||
# import certificate and provisioning profile from secrets
|
||||
echo -n "$APP_STORE_P12" | base64 --decode -o $CERTIFICATE_PATH
|
||||
echo -n "$APP_STORE_PROVISION_PROD" | base64 --decode -o $PROVISION_PATH
|
||||
|
||||
# create temporary keychain
|
||||
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
|
||||
# import certificate to keychain
|
||||
security import $CERTIFICATE_PATH -P "$APP_STORE_P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
|
||||
# apply provisioning profile
|
||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
cp $PROVISION_PATH ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
|
||||
- name: Restore ios/Runner/ExportOptions.plist
|
||||
run: bash .github/scripts/restore_from_base64.sh "${{ secrets.APP_STORE_EXPORT_OPTIONS }}" "ios/Runner/ExportOptions.plist"
|
||||
|
||||
- name: Restore firebase_options.dart
|
||||
run: bash .github/scripts/restore_from_base64.sh "${{ secrets.FIREBASE_OPTIONS }}" "lib/firebase_options.dart"
|
||||
|
@ -59,10 +79,21 @@ jobs:
|
|||
flutter pub run intl_utils:generate
|
||||
|
||||
- name: Build .ipa
|
||||
run: flutter build ipa --release --flavor $FLAVOR -t lib/main_$FLAVOR.dart
|
||||
run: |
|
||||
flutter build ipa \
|
||||
--release \
|
||||
--flavor $FLAVOR \
|
||||
--target lib/main_$FLAVOR.dart \
|
||||
--export-options-plist=ios/Runner/ExportOptions.plist
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: m3_lightmeter_$FLAVOR_ipa
|
||||
path: build/ios/ipa/lightmeter.ipa
|
||||
|
||||
- name: Clean up keychain and provisioning profile
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
security delete-keychain $RUNNER_TEMP/app-signing.keychain-db
|
||||
rm ~/Library/MobileDevice/Provisioning\ Profiles/build_provision.mobileprovision
|
||||
|
|
|
@ -399,7 +399,7 @@
|
|||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
|
@ -414,7 +414,7 @@
|
|||
PRODUCT_BUNDLE_IDENTIFIER = com.vodemn.lightmeter;
|
||||
PRODUCT_NAME = Lightmeter;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = m3_lightmeter_provision;
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Lightmeter Distribution";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
|
@ -536,7 +536,7 @@
|
|||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
|
@ -551,7 +551,7 @@
|
|||
PRODUCT_BUNDLE_IDENTIFIER = com.vodemn.lightmeter;
|
||||
PRODUCT_NAME = Lightmeter;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = m3_lightmeter_provision;
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Lightmeter Distribution";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
@ -567,7 +567,7 @@
|
|||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
|
@ -582,7 +582,7 @@
|
|||
PRODUCT_BUNDLE_IDENTIFIER = com.vodemn.lightmeter;
|
||||
PRODUCT_NAME = Lightmeter;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = m3_lightmeter_provision;
|
||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "Lightmeter Distribution";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
|
|
Loading…
Reference in a new issue