-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
53 lines (47 loc) · 2.32 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
services:
- docker
env:
# Use this 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"
- GAME_NAME="Bestia Client"
install:
- docker pull gamedrivendesign/godot-export
# 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.
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
- 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
- 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
# - 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
# 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: s3
access_key_id: ${AWS_ACCESS_KEY}
secret_access_key: ${AWS_SECRET_KEY}
skip-cleanup: true
acl: public_read
bucket: "bestia-client"
file:
- "${GAME_NAME}-linux.zip"
- "${GAME_NAME}-windows.zip"
on:
# Create GitHub Releases for new git tags
# regardless of the branch.
all_branches: master
# tags: true