-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
33 lines (33 loc) · 873 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
language: rust
cache: cargo
os:
- linux
- osx
- windows
branches:
only:
- main
rust:
- nightly
script:
- cargo build --release --features web
before_deploy:
# Setup variables
- export TRAVIS_TAG=v${TRAVIS_BUILD_NUMBER}-${TRAVIS_OS_NAME}
- export EXE_NAME=${PROJECT_NAME}
- export ZIP_NAME=${PROJECT_NAME}-${TRAVIS_TAG}.zip
# Set up git user name and tag this commit
- git config --local user.name "Paul Reesman"
- git config --local user.email "[email protected]"
- git tag $TRAVIS_TAG
# Create artifact
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export EXE_NAME=${EXE_NAME}.exe ; fi
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install zip ; fi
- cp target/release/${EXE_NAME} .
- zip -r ${ZIP_NAME} ${EXE_NAME}
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file: ${ZIP_NAME}
on:
branch: main