diff --git a/.travis.yml b/.travis.yml index 09792ec..e5fc902 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,34 @@ language: objective-c cache: directories: - - vendor/bundle + - vendor/bundle +before_install: +- curl 'https://developer.apple.com/certificationauthority/AppleWWDRCA.cer' -o certificates/AppleWWDRCA.cer +- brew update +- brew install carthage install: - - bundle install --path=vendor/bundle --binstubs=vendor/bin +- bundle install --path=vendor/bundle --binstubs=vendor/bin +- bundle exec rake certificates:install +- carthage checkout +- carthage build --no-skip-current script: - - bundle exec rake test:ios test:osx test:SecEncodeTransformTests +- bundle exec rake test:ios test:osx test:SecEncodeTransformTests branches: only: - - master + - master + - /^v\d+\.\d+\.\d+$/ env: global: - - LANG=en_US.UTF-8 - - LC_ALL=en_US.UTF-8 + - LANG=en_US.UTF-8 + - LC_ALL=en_US.UTF-8 + - secure: IP57b/yOhCM+IRcOrnlWZAauuqWTtz6k/a3QTyUXGFyryyLJC1sQSD5wzDIP7YfgM9MrnjUihZEuyR/PSyD/GNQFk5hHNToLBScJg4p0eKQaLoxFeT9twFF4AxwUo4eaYEcgodLDm/1LMe+KwX27QOpb8BboAwg0NychgoVy/dw= +before_deploy: +- carthage archive Base32 +deploy: + provider: releases + api_key: + secure: dzODt3i8Ta8CtN1phcOpVxhzpgRbVJ129VLCKZfPfBHwCVbPC17k8mwotKbZ85bqD9rWoqAaRRNLCHL4j57fkbb+vXYVIsv1LT9xQNTYJkbWQNUYCylnHUaKgf7Pef+ZcHeXxGZXX0Jg27TaenTsujg+nILHY2ivz1nVmb92rzk= + file: Base32.framework.zip + on: + tags: true + skip_cleanup: true diff --git a/Rakefile b/Rakefile index a9cc8af..203e6dc 100644 --- a/Rakefile +++ b/Rakefile @@ -39,3 +39,11 @@ namespace :test do t.formatter = 'xcpretty -c' end end + +# If this environment variable is missing, we must not be running on Travis. +if ENV["KEY_PASSWORD"] + XCJobs::Certificate.new do |t| + t.add_certificate('./certificates/AppleWWDRCA.cer') + t.add_certificate('./certificates/development.p12', ENV["KEY_PASSWORD"]) + end +end diff --git a/certificates/development.p12 b/certificates/development.p12 new file mode 100644 index 0000000..6f265db Binary files /dev/null and b/certificates/development.p12 differ