2019-03-06 20:25:34 +00:00
|
|
|
# Travis CI configuration for building macOS binaries for ffsend.
|
|
|
|
# These macOS binaries are published on GitHub as release files.
|
|
|
|
#
|
|
|
|
# The main CI runs on GitLab CI at: https://gitlab.com/timvisee/ffsend/pipelines
|
|
|
|
|
|
|
|
language: rust
|
|
|
|
|
2019-03-06 22:06:18 +00:00
|
|
|
# Only build release jobs
|
2019-03-06 20:25:34 +00:00
|
|
|
stages:
|
2019-03-06 21:20:23 +00:00
|
|
|
- name: release
|
|
|
|
if: tag =~ ^v(\d+\.)*\d+$
|
2019-03-06 20:25:34 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: release
|
|
|
|
rust: stable
|
|
|
|
os: osx
|
|
|
|
env: RUST_TARGET=x86_64-apple-darwin
|
|
|
|
cache: cargo
|
|
|
|
script:
|
|
|
|
# Create release binary for macOS
|
|
|
|
- echo "Creating release binary for $RUST_TARGET..."
|
|
|
|
- cargo build --target=$RUST_TARGET --release --verbose --all
|
|
|
|
- cp target/$RUST_TARGET/release/ffsend ./ffsend
|
|
|
|
|
|
|
|
# Download github-release binary
|
2019-03-06 21:15:15 +00:00
|
|
|
- wget https://github.com/tfausak/github-release/releases/download/1.2.4/github-release-osx.gz -O github-release.gz
|
2019-03-06 20:25:34 +00:00
|
|
|
- gunzip github-release.gz
|
|
|
|
- chmod a+x ./github-release
|
|
|
|
|
|
|
|
# Create the release, upload binary
|
|
|
|
- ./github-release release --token "$GITHUB_TOKEN" --owner timvisee --repo ffsend --tag "$TRAVIS_TAG" --title "ffsend $TRAVIS_TAG"
|
|
|
|
- ./github-release upload --token "$GITHUB_TOKEN" --owner timvisee --repo ffsend --tag "$TRAVIS_TAG" --file ./ffsend --name ffsend-$TRAVIS_TAG-macos
|
2019-03-23 16:48:27 +00:00
|
|
|
|
2019-03-26 13:11:12 +00:00
|
|
|
# TODO: disabled for now to throttle updates, manually enable on major release
|
|
|
|
# # Update homebrew package
|
|
|
|
# - git config --global user.name "timvisee"
|
|
|
|
# - git config --global user.email "$GIT_EMAIL"
|
|
|
|
# - git config --global credential.helper store
|
|
|
|
# - echo "https://timvisee:$HOMEBREW_GITHUB_API_TOKEN@github.com" >> ~/.git-credentials
|
|
|
|
# - brew bump-formula-pr --url="https://github.com/timvisee/ffsend/archive/$TRAVIS_TAG.tar.gz" --message="Automated release pull request using continuous integration." --no-browse -f -v ffsend
|