58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
# Travis does CD, GHA does CI
|
|
if: branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/ OR branch =~ /^\d+\.\d+\.\d+(-.*)?$/
|
|
|
|
stages:
|
|
- name: deploy
|
|
if: branch =~ /^deploy-\d+\.\d+\.\d+(-.*)?$/
|
|
- name: publish
|
|
if: branch =~ /^\d+\.\d+\.\d+(-.*)?$/
|
|
|
|
os: osx
|
|
|
|
jobs:
|
|
include:
|
|
- 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
|