-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (65 loc) · 3.54 KB
/
.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
services:
- docker
env:
# Use GAME_NAME to set your game's name. It is being used
# throughout this file for naming exported artifacts.
# This will, for example, create an "Awesome Game.exe"
# Also set the Godot version you want to use here. Supported Godot versions can be
# found here: https://cloud.docker.com/u/gamedrivendesign/repository/docker/gamedrivendesign/godot-export/tags
# If your version is not available, please open an issue here: https://github.com/GameDrivenDesign/docker-godot-export
- GAME_NAME="Shapeborn" GODOT_VERSION="3.2.3"
install:
- docker pull "gamedrivendesign/godot-export:${GODOT_VERSION}"
# Each of the following lines exports the game for a given platform.
# You can specify the platform in the EXPORT_NAME variable
# The exported game will be written to the folder specified after the second "-v" flag
# "-v $(pwd)/output/html5:/build/output" writes the exported game to the "output/html5" folder.
#
# Make sure that you have created an `export_presets.cfg` file with all necessary export
# templates (HTML5, Linux/X11, Windows Desktop, Max OSX) as described in the Godot documentation:
# https://docs.godotengine.org/en/3.1/getting_started/workflow/export/exporting_projects.html
script:
- docker run -e EXPORT_NAME="HTML5" -e OUTPUT_FILENAME="index.html" -v $(pwd):/build/src -v $(pwd)/output/html5:/build/output "gamedrivendesign/godot-export:${GODOT_VERSION}"
- docker run -e EXPORT_NAME="Linux/X11" -e OUTPUT_FILENAME="${GAME_NAME}" -v $(pwd):/build/src -v $(pwd)/output/linux:/build/output "gamedrivendesign/godot-export:${GODOT_VERSION}"
- docker run -e EXPORT_NAME="Windows Desktop" -e OUTPUT_FILENAME="${GAME_NAME}.exe" -v $(pwd):/build/src -v $(pwd)/output/windows:/build/output "gamedrivendesign/godot-export:${GODOT_VERSION}"
- docker run -e EXPORT_NAME="Mac OSX" -e OUTPUT_FILENAME="${GAME_NAME}-mac.zip" -v $(pwd):/build/src -v $(pwd)/output/mac:/build/output "gamedrivendesign/godot-export:${GODOT_VERSION}"
# Now comes deployment related code.
# To make this work, you need to set a GITHUB_TOKEN environment variable through
# the TravisCI web ui. For more information take a look at the TravisCI docs:
# https://docs.travis-ci.com/user/deployment/pages/#Setting-the-GitHub-token
# This creates zip files from the exported game builds for the
# three desktop platforms
before_deploy:
- zip -j "${GAME_NAME}-linux.zip" output/linux/*
- zip -j "${GAME_NAME}-windows.zip" output/windows/*
# No need to zip the mac game, because it already is a zip
- cp -R output/mac/* .
deploy:
# The following block is responsible to upload the zip files
# created above to GitHub Releases whenever a new git tag
# is created.
- provider: releases
skip-cleanup: true
api_key: $GITHUB_TOKEN
file:
- "${GAME_NAME}-linux.zip"
- "${GAME_NAME}-windows.zip"
- "${GAME_NAME}-mac.zip"
on:
# Create GitHub Releases for new git tags
# regardless of the branch.
all_branches: true
tags: true
# The following block is responsible for pushing the HTML5 version of the game
# to GitHub Pages. To do so, Travis will commit the contents specified in "local-dir"
# to a "gh-pages" branch in your repository. It will then be accessible at:
# username.github.io/reponame if your repo is at github.com/username/reponame.
- provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local-dir: output/html5
on:
# This will only update the game with new commits from the master branch
# You can optionally only update the game on new git tags.
branch: master
# tags: true