mirror of
https://github.com/timvisee/ffsend.git
synced 2025-10-03 17:49:15 +02:00
Properly release cross-compiled binaries
This commit is contained in:
parent
81892cb144
commit
7bb87079b7
1 changed files with 7 additions and 4 deletions
11
.travis.yml
11
.travis.yml
|
@ -66,6 +66,7 @@ jobs:
|
||||||
env: TARGET=x86_64-unknown-linux-gnu
|
env: TARGET=x86_64-unknown-linux-gnu
|
||||||
cache: cargo
|
cache: cargo
|
||||||
script:
|
script:
|
||||||
|
- echo "Creating release crate on crates.io..."
|
||||||
- echo $CARGO_TOKEN | cargo login
|
- echo $CARGO_TOKEN | cargo login
|
||||||
- cargo publish --verbose
|
- cargo publish --verbose
|
||||||
|
|
||||||
|
@ -77,14 +78,16 @@ jobs:
|
||||||
script: &script-github-release
|
script: &script-github-release
|
||||||
- |
|
- |
|
||||||
if [ $TARGET == "x86_64-unknown-linux-gnu" ] || [ $TARGET == "x86_64-apple-darwin" ]; then
|
if [ $TARGET == "x86_64-unknown-linux-gnu" ] || [ $TARGET == "x86_64-apple-darwin" ]; then
|
||||||
|
echo "Creating release binary on GitHub for $TARGET..."
|
||||||
cargo build --release --verbose --all
|
cargo build --release --verbose --all
|
||||||
|
cp target/release/ffsend ./ffsend
|
||||||
else
|
else
|
||||||
echo 'Starting build using cross for cross compilation...'
|
echo "Creating release binary on GitHub for $TARGET (cross compiled)..."
|
||||||
cross build --target $TARGET --release --verbose --all
|
cross build --target $TARGET --release --verbose --all
|
||||||
|
cp target/$TARGET/release/ffsend ./ffsend
|
||||||
fi
|
fi
|
||||||
- cd target/release
|
- tar -czvf $TRAVIS_BUILD_DIR/ffsend-$TARGET.tar.gz ./ffsend
|
||||||
- tar -czvf $TRAVIS_BUILD_DIR/ffsend-$TARGET.tar.gz ffsend
|
- rm ./ffsend
|
||||||
- cd $TRAVIS_BUILD_DIR
|
|
||||||
deploy: &deploy-github-release
|
deploy: &deploy-github-release
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key: $GITHUB_OAUTH_TOKEN
|
api_key: $GITHUB_OAUTH_TOKEN
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue