mindoc/.travis.yml

47 lines
1.2 KiB
YAML
Raw Normal View History

os: linux
dist: focal
2017-05-08 17:19:02 +08:00
language: go
2017-05-08 17:19:02 +08:00
go:
- "1.18.1"
2017-05-08 17:38:35 +08:00
arch:
- amd64
env:
- GO111MODULE=on CGO_ENABLED=1
2019-03-04 15:58:55 +08:00
install:
- go mod tidy -v
2017-05-08 17:38:35 +08:00
before_install:
- whereis gcc
- go env
2017-05-08 17:38:35 +08:00
script:
- go build -o mindoc_linux_amd64 -ldflags "-w"
- cp conf/app.conf.example conf/app.conf
- ./mindoc_linux_amd64 version
- rm conf/app.conf
2017-05-08 17:19:02 +08:00
2017-05-08 17:25:31 +08:00
before_deploy:
- go mod tidy -v && GOARCH=amd64 GOOS=linux go build -v -o mindoc_linux_amd64 -ldflags="-w -X 'github.com/mindoc-org/mindoc/conf.VERSION=$TRAVIS_TAG' -X 'github.com/mindoc-org/mindoc/conf.BUILD_TIME=`date`' -X 'conf.GO_VERSION=`go version`'"
# remove files
- rm appveyor.yml docker-compose.yml Dockerfile .travis.yml .gitattributes .gitignore go.mod go.sum main.go README.md simsun.ttc start.sh sync_host.sh build_amd64.sh build_musl_amd64.sh
# remove dirs
- rm -rf cache commands controllers converter .git .github graphics mail models routers utils runtime
- ls -alh
2017-05-09 10:33:02 +08:00
- cp conf/app.conf.example conf/app.conf
2022-07-20 15:04:01 +08:00
- zip -r mindoc_linux_amd64.zip conf static uploads views lib mindoc_linux_amd64 LICENSE.md
2017-07-10 18:05:21 +08:00
2017-05-08 17:19:02 +08:00
deploy:
provider: releases
token: $CI_USER_TOKEN
cleanup: true
overwrite: true
2017-05-08 17:19:02 +08:00
file:
2017-06-14 09:29:08 +08:00
- mindoc_linux_amd64.zip
2017-05-08 17:19:02 +08:00
on:
tags: true
branch: master