mirror of
https://github.com/go-shiori/shiori.git
synced 2024-11-16 06:06:31 +08:00
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
language: go
|
|
sudo: true
|
|
matrix:
|
|
include:
|
|
- go: 1.x
|
|
env: LATEST=true
|
|
- go: 1.9
|
|
|
|
before_install:
|
|
- go get github.com/mattn/go-isatty # needed for progress bar in windows
|
|
- go get github.com/inconshreveable/mousetrap # needed for windows builds
|
|
- sudo apt install gcc-mingw-w64
|
|
|
|
install:
|
|
- go get github.com/RadhiFadlillah/shiori
|
|
|
|
script:
|
|
- go generate
|
|
- go get -t -v ./...
|
|
- diff -u <(echo -n) <(gofmt -d .)
|
|
- go vet $(go list ./... | grep -v /vendor/)
|
|
- go test -v -race ./...
|
|
# only build binaries from the latest Go release.
|
|
- if [ "${LATEST}" = "true" ]; then
|
|
env GOARCH=386 go build -o shiori_linux_386;
|
|
env GOARCH=amd64 go build -o shiori_linux_amd64;
|
|
env GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc go build -o shiori_windows_386.exe;
|
|
env GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc go build -o shiori_windows_amd64.exe;
|
|
fi
|
|
|
|
deploy:
|
|
provider: releases
|
|
skip_cleanup: true
|
|
api_key:
|
|
secure: $TOKEN
|
|
file:
|
|
- shiori_linux_386
|
|
- shiori_linux_amd64
|
|
- shiori_windows_386.exe
|
|
- shiori_windows_amd64.exe
|
|
on:
|
|
tags: true
|
|
branches:
|
|
only:
|
|
- master
|
|
condition: $LATEST = true
|