Skip to content

Commit

Permalink
Upload release build to Github
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksueiR committed Feb 9, 2015
1 parent 8ca5733 commit 88975b0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ script:

after_success:
- grunt gh-pages:travis
- grunt release
22 changes: 22 additions & 0 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,14 @@ module.exports = (grunt) ->
grunt.task.run tasks
)

@registerTask(
'release'
'INTERNAL Uploads release builds to GitHub releases.'
() ->
if process.env.TRAVIS_TAG ##&& (process.env.TRAVIS_BRANCH == 'develop' || process.env.TRAVIS_BRANCH == 'master')
grunt.task.run 'github-release'
)

smartExpand = ( cwd, arr, extra ) ->
# determine file order here and concat to arr
extra = extra or []
Expand Down Expand Up @@ -1373,6 +1381,19 @@ module.exports = (grunt) ->
'tarball/**/*.*'
]

'github-release':
options:
repository: process.env.HOME_REPO
auth:
user: 'ramp-pcar-bot'
password: process.env.GH_TOKEN
release:
draft: false
prerelease: true
tag_name: process.env.TRAVIS_TAG
files:
src: ['tarball/*.*']

# These plugins provide necessary tasks.
@loadNpmTasks 'assemble'
@loadNpmTasks 'grunt-autoprefixer'
Expand All @@ -1390,6 +1411,7 @@ module.exports = (grunt) ->
@loadNpmTasks 'grunt-contrib-watch'
@loadNpmTasks 'grunt-contrib-yuidoc'
@loadNpmTasks 'grunt-gh-pages'
@loadNpmTasks 'grunt-github-releaser'
@loadNpmTasks 'grunt-merge-json'
@loadNpmTasks 'grunt-docco'
@loadNpmTasks 'grunt-jsonlint'
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"grunt-contrib-watch": "~0.6.1",
"grunt-contrib-yuidoc": "~0.5.2",
"grunt-gh-pages": "~0.9.1",
"grunt-github-releaser": "~0.1.17",
"grunt-merge-json": "~0.9.5",
"grunt-docco": "~0.3.3",
"grunt-hub": "~0.7.0",
Expand Down

0 comments on commit 88975b0

Please sign in to comment.