Skip to content

Commit

Permalink
Merge pull request #3 from tarappo/support_travisci
Browse files Browse the repository at this point in the history
TravisCIサポート
  • Loading branch information
とし authored Aug 25, 2017
2 parents da04323 + 555a7ec commit a77a6d3
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
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.

0 comments on commit a77a6d3

Please sign in to comment.