Skip to content

Commit 984e0f0

Browse files
committed
Update travis script
1 parent 5d1f86a commit 984e0f0

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

.travis.yml

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
########################
44
# SOLUTION_NAME The name without file-ending
55
# DEPLOY_BUILD Which build you want to pack and push to nuget('Debug' or 'Release')
6+
# MONOGAME Set it if you like to build a MonoGame project
7+
# ('latest' or a specific version number of a release on their GitHub
8+
# page like 'v3.7.1'), else unset it (or set it to 'false')
69
# NUGET Whether or not to deploy the result as a nuget-package (true if set)
710
# If you don't want to deploy, unset it (or set it to 'false')
811
#
@@ -11,10 +14,22 @@
1114
# NUGET_PROJECT_FILENAME The name without file-ending
1215
# NUGET_PROJECT_PATH The path to your project (starting at git-repo-root; which is /)
1316
#
17+
# GITHUB_API_KEY Your key from your GitHub repository (to push the release-zip),
18+
# if you want it to be published, else unset it (or set it to 'false')
19+
# Has to be a personal API-key (Your GitHub-user-image -> Settings ->
20+
# Developer settings -> Personal access tokens). Has to have the 'repo'
21+
# permission (top level).
22+
# BUILD_TARGET The directory your build is saved in (to get it zipped for a
23+
# GitHub release)
24+
#
1425
####################
1526
### GENERAL INFO ###
1627
####################
17-
# git/depth: false is needed for minver
28+
# - git/depth: false is needed for minver
29+
# - The 'deploy' step in Travis isn't the same process as the rest. So you have to re-source
30+
# the functions into that process. More than that it isn't a full sh process like with the
31+
# script-phase. So you cannot even source from there directly. That's why the source
32+
# command is IN the deploy.sh script.
1833

1934
language: csharp
2035
solution: $SOLUTION_NAME.sln
@@ -29,10 +44,21 @@ before_script:
2944
- source $TRAVIS/before_script.sh
3045
script:
3146
- source $TRAVIS/script.sh
47+
48+
before_deploy:
49+
- zip -r $DEPLOY_BUILD.$VERSION.zip $BUILD_TARGET/*
3250
deploy:
33-
skip_cleanup: true
34-
provider: script
35-
script:
36-
- ./$TRAVIS/deploy.sh
37-
on:
38-
branch: master
51+
- provider: script
52+
skip_cleanup: true
53+
script: ./$TRAVIS/deploy.sh
54+
on:
55+
branch: master
56+
- provider: releases
57+
skip_cleanup: true
58+
overwrite: true
59+
api_key:
60+
secure: $GITHUB_API_KEY
61+
file: $DEPLOY_BUILD.$VERSION.zip
62+
on:
63+
tags: true
64+
branch: master

0 commit comments

Comments
 (0)