Skip to content

Commit

Permalink
Deploy with Travis again
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jul 26, 2020
1 parent ce5c54a commit 909e9ba
Showing 1 changed file with 53 additions and 1 deletion.
54 changes: 53 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# only run for: merge commits, releases and pull-requests
if: type != push OR branch = master OR branch =~ /^\d+\.\d+(\.\d+)?(-\S*)?$/
if: type != push OR branch = master OR branch =~ /^\d+\.\d+(\.\d+)?(-\S*)?$/ OR branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/

os: osx
osx_image: xcode10.1
language: swift
xcode_project: LegibleError.xcodeproj
xcode_scheme: LegibleError-Package

stages:
- name: test
- name: deploy
if: branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/
- name: publish
if: branch =~ /^\d+\.\d+\.\d+(-.*)?$/

jobs:
include:
- name: macOS / Swift 4.0.3 (Xcode 10.1)
Expand All @@ -18,3 +25,48 @@ jobs:

- name: macOS / Swift 5.0.1 (Xcode 10.2)
script: swift test --parallel -Xswiftc -warnings-as-errors

- stage: deploy
name: Deploy
osx_image: xcode11
env: HOMEBREW_NO_INSTALL_CLEANUP=1
install: brew install mxcl/made/swift-sh
git.depth: false
script:
- set -e
- export VERSION=$(echo $TRAVIS_TAG | cut -c 8-)
- git tag "$VERSION" --force
- git remote set-url origin "https://$GITHUB_TOKEN@github.com/$TRAVIS_REPO_SLUG.git"
- git push origin "$VERSION"
- swift sh <(curl https://raw.githubusercontent.com/mxcl/ops/master/deploy) publish-release
- git push origin :$TRAVIS_TAG
after_failure: |
export VERSION=$(echo $TRAVIS_TAG | cut -c 8-)
git push origin :$VERSION
- stage: publish
name: Jazzy
osx_image: xcode11
install: gem install jazzy
before_script: swift package generate-xcodeproj
script: |
jazzy --config .github/jazzy.yml \
--module-version $TRAVIS_TAG \
--github_url "https://github.com/$TRAVIS_REPO_SLUG"
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local-dir: output
on:
tags: true

- name: CocoaPods
env: HOMEBREW_NO_INSTALL_CLEANUP=1
osx_image: xcode11
install:
- brew install mxcl/made/swift-sh
- curl -O https://raw.githubusercontent.com/mxcl/ops/master/deploy
- chmod u+x deploy
before_script: ./deploy generate-podspec
script: pod trunk push

0 comments on commit 909e9ba

Please sign in to comment.