Last active
October 28, 2020 21:14
-
-
Save watura/2b26cd2db748ba921800146c91da7135 to your computer and use it in GitHub Desktop.
Flutter ios firebase app distribution
This file contains hidden or 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
require 'fileutils' | |
default_platform :ios | |
platform :ios do | |
before_all do |lane, options| | |
if is_ci | |
ENV['MATCH_KEYCHAIN_NAME'] = 'TempKeychain' | |
ENV['MATCH_KEYCHAIN_PASSWORD'] = 'TempKeychainPassword' | |
create_temp_keychain | |
end | |
end | |
lane :build do | |
match(readonly: is_ci) | |
automatic_code_signing( | |
code_sign_identity: "iPhone Distribution", | |
team_id: ENV["sigh_BUNDLE_IDENTIFIER_adhoc_team-id"], | |
profile_name: ENV["sigh_BUNDLE_IDENTIFIER_adhoc_profile-name"] | |
) | |
gym() | |
end | |
private_lane :create_temp_keychain do | |
create_keychain( | |
name: ENV['MATCH_KEYCHAIN_NAME'], | |
password: ENV['MATCH_KEYCHAIN_PASSWORD'], | |
timeout: 1800 | |
) | |
end | |
end |
This file contains hidden or 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
name: flutter_build_deploy_ios | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: subosito/[email protected] | |
with: | |
channel: 'dev' | |
- name: Flutter setup | |
run: | | |
flutter pub get | |
flutter build ios --release --no-codesign | |
- name: Build | |
env: | |
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} | |
MATCH_PASSWORD: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} | |
run: | | |
cd ios | |
fastlane build | |
- name: Use Node.js 8.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 8.x | |
- name: Install Firebase | |
run: yarn install | |
- name: Upload ipa | |
run: yarn run firebase appdistribution:distribute ios/build/Runner.ipa --app "${{ secrets.IOS_APP_ID }}" --token "${{ secrets.FIREBASE_TOKEN }}" |
This file contains hidden or 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
scheme("Runner") | |
clean(true) | |
export_method("ad-hoc") | |
export_xcargs("-allowProvisioningUpdates") | |
output_directory("./build") | |
codesigning_identity("Apple Distribution: ") |
This file contains hidden or 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
if ENV["PERSONAL_TOKEN"] != nil # CI でも ローカルでも同じ様に動く様にしたい | |
git_url("https://" + ENV["PERSONAL_TOKEN"] + "@github.com/watura/Certificates.git") | |
else | |
git_url("https://github.com/watura/Certificates.git) | |
end | |
storage_mode("git") | |
type("adhoc") | |
app_identifier("APP_IDENTIFIER") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment