42 lines
1.0 KiB
YAML

language: go
go:
- 1.11.x
- 1.12.x
- 1.13.x
- 1.x
os:
- linux
- windows
env:
- GO111MODULE=on
script:
- cd src/
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then go test -v -test.short; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then go test -v; fi'
jobs:
include:
- stage: deploy
go: 1.x
os: linux
before_install:
- curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
- sudo apt-get install -y nodejs
script:
- make gen_release
- mv build/factorio-server-manager-linux.zip ~/factorio-server-manager-linux-${TRAVIS_TAG}.zip
- mv build/factorio-server-manager-windows.zip ~/factorio-server-manager-windows-${TRAVIS_TAG}.zip
deploy:
provider: releases
api_key: "${GITHUB_TOKEN}"
draft: true
skip_cleanup: true
on:
tags: true
file:
- ~/factorio-server-manager-linux-${TRAVIS_TAG}.zip
- ~/factorio-server-manager-windows-${TRAVIS_TAG}.zip