Sfoglia il codice sorgente

Deploy prebuilt framework from Travis-CI to GitHub Release

Norio Nomura 10 anni fa
parent
commit
5d01390789
3 ha cambiato i file con 33 aggiunte e 6 eliminazioni
  1. 25 6
      .travis.yml
  2. 8 0
      Rakefile
  3. BIN
      certificates/development.p12

+ 25 - 6
.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

+ 8 - 0
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

BIN
certificates/development.p12