Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TravisCIサポート #3

Merged
merged 3 commits into from
Aug 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
language: swift

osx_image: xcode8.3

xcode_project: ci-sample.xcodeproj
xcode_scheme: ci-sample

before_install:
- openssl aes-256-cbc -K $encrypted_448470aeb6e7_key -iv $encrypted_448470aeb6e7_iv -in ./travis/secrets.tar.enc -out ./travis/secrets.tar -d
- tar xvf ./travis/secrets.tar -C ./travis
- gem install xcpretty-travis-formatter --no-document
- bundle install --path ./vendor/bundle

before_script:
- bundle exec fastlane setup_certificate
- mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
- cp ./travis/*mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/

script:
- bundle exec fastlane build

after_success:

after_script:
- security delete-keychain ios-build.keychain
- rm -f "~/Library/MobileDevice/Provisioning Profiles/"

notifications:
email: false
20 changes: 20 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ fastlane_version "2.53.1"
default_platform :ios

platform :ios do
keychain_name = "ios-build.keychain"
keychain_password = SecureRandom.base64

lane :build do
clean_build_artifacts
Expand All @@ -15,4 +17,22 @@ platform :ios do
)
end

lane :setup_certificate do
create_keychain(
name: keychain_name,
password: keychain_password,
default_keychain: true,
unlock: true,
timeout: 3600,
add_to_search_list: true
)

import_certificate(
certificate_path: "travis/dist.p12",
certificate_password: ENV["KEY_PASSWORD"],
keychain_name: keychain_name,
keychain_password: keychain_password
)
end

end
2 changes: 0 additions & 2 deletions travis.yml

This file was deleted.

Binary file added travis/secrets.tar.enc
Binary file not shown.