Skip to content

Commit

Permalink
[FIX] CIの修正 (#738)
Browse files Browse the repository at this point in the history
* try1:

* fix: typo

* fix: match_password

* fix

* fox

* fix

* fix: ci

* fix
  • Loading branch information
YumNumm committed Jun 16, 2024
1 parent 0a30d76 commit 0571e04
Show file tree
Hide file tree
Showing 9 changed files with 319 additions and 163 deletions.
57 changes: 53 additions & 4 deletions .github/workflows/deploy-ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,10 @@ jobs:
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
run: |
echo '${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}' | base64 -d > AuthKey_NGL2W4BQP6.p8
cp *.p8 ios/
echo '${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}' | base64 -d > ios/AuthKey_NGL2W4BQP6.p8
- name: Build IPA
working-directory: app
working-directory: app/ios
env:
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
Expand All @@ -128,5 +127,55 @@ jobs:
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
FASTLANE_USER: yumnumm@icloud.com
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
MATCH_USERNAME: yumnumm@icloud.com
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD}}
MATCH_GIT_URL: git@github.com:YumNumm/EQMonitor_secret.git
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}
LANG: ja_JP.UTF-8
run: bundle exec fastlane beta
run: bundle exec fastlane build

- name: Upload artifact ipa
uses: actions/upload-artifact@v4
with:
path: app/ios/Runner.ipa
name: release-ios

deploy:
runs-on: macos-latest
needs: build
steps:
- name: Download artifact ipa
uses: actions/download-artifact@v4
with:
name: release-ios
path: app/ios/Runner.ipa

- name: Install Gems
working-directory: app/ios
run: |
gem install bundler
bundle install
- name: Install Brewfile dependencies
working-directory: app/ios
run: brew bundle

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest

- name: Show Xcode version
run: xcodebuild -version

- name: Set App Store Connect Configuration
working-directory: app
env:
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
run: |
echo '${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}' | base64 -d > ios/AuthKey_NGL2W4BQP6.p8
- name: Upload
run: |
bundle exec fastlane upload
working-directory: app/ios
24 changes: 12 additions & 12 deletions app/ios/Podfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions app/ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,33 @@ platform :ios do
)
end

lane :build do
app_store_connect_api_key(
key_id: "NGL2W4BQP6",
issuer_id: "fd4cca56-716b-4f03-8e44-de72a03453db",
key_filepath: "./AuthKey_NGL2W4BQP6.p8"
)
setup_ci if ENV['CI']
match(
type: "appstore",
readonly: is_ci,
)

# Build the project
build_app(
archive_path: "../build/ios/archive/Runner.xcarchive",
export_method: "app-store",
xcargs: "-allowProvisioningUpdates",
)
end

desc "Push a new beta build to TestFlight"
lane :beta do
app_store_connect_api_key(
key_id: "NGL2W4BQP6",
issuer_id: "fd4cca56-716b-4f03-8e44-de72a03453db",
key_filepath: "./AuthKey_NGL2W4BQP6.p8"
)
setup_ci if ENV['CI']
match(
type: "appstore",
Expand Down Expand Up @@ -79,6 +104,11 @@ platform :ios do
desc "Push a new build to App Store Connect"
lane :upload do
setup_ci if ENV['CI']
app_store_connect_api_key(
key_id: "NGL2W4BQP6",
issuer_id: "fd4cca56-716b-4f03-8e44-de72a03453db",
key_filepath: "./AuthKey_NGL2W4BQP6.p8"
)
# Upload the project
changelog = changelog_from_git_commits(
between: [last_git_tag , "HEAD"],
Expand Down
3 changes: 2 additions & 1 deletion app/lib/feature/donation/data/donation_notifier.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:purchases_flutter/purchases_flutter.dart';
import 'package:riverpod_annotation/riverpod_annotation.dart';

Expand All @@ -14,7 +15,7 @@ Future<void> initInAppPurchase() async {
TargetPlatform.android => PurchasesConfiguration(
'goog_aEcAyBNviKgaKzmCwAOXSiXwHIb',
),
TargetPlatform.iOS => PurchasesConfiguration(
TargetPlatform.iOS || TargetPlatform.macOS => PurchasesConfiguration(
'appl_BUymtTPkwhhVuihBlVOddLxOBaQ',
),
_ => throw UnimplementedError(),
Expand Down
Loading

0 comments on commit 0571e04

Please sign in to comment.