forked from WangYihang/Platypus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
27 lines (27 loc) · 813 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
language: go
go:
- 1.16.x
before_install:
- sudo apt-get install -y upx
- nvm install --lts
- npm install -g yarn
- go get -u github.com/go-bindata/go-bindata/...
- mkdir termites html/ttyd/dist html/frontend/build
- go-bindata -pkg resource -o lib/util/resource/resource.go termites/... lib/runtime/... html/ttyd/dist/... html/frontend/build/...
addons:
apt:
update: true
script:
- go test ./lib/...
- if [[ -n $TRAVIS_TAG ]]; then make release; fi
- if [[ -n $TRAVIS_TAG ]]; then for i in `ls $TRAVIS_BUILD_DIR/build/`; do upx --best "$TRAVIS_BUILD_DIR/build/$i"; done; fi
- if [[ -z ${TRAVIS_TAG} ]]; then make build; fi
deploy:
provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: $TRAVIS_BUILD_DIR/build/*
skip_cleanup: true
edge: true
on:
tags: true