我有一个Chrome应用,我想自动部署到Chrome应用商店,作为我的持续投放管道的一部分......
有没有办法用Travis CI做到这一点?
Travis是否提供了将压缩工件上传到chrome商店的方法?
是否可以使用cli为chrome商店构建此类功能?
答案 0 :(得分:2)
您可以使用grunt模块和grunt-webstore-upload
创建run it from Travis任务示例Gruntfile.js:
var archiveName = "buildExt.zip";
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
webstore_upload: {
"accounts": {
"default": { //account under this section will be used by default
publish: true, //publish item right after uploading. default false
client_id: "xxx",
client_secret: "yyy",
refresh_token: "zzz"
}
},
"extensions": {
"myExtensionName": {
//required
appID: "aaa",
publish: true,
//required, we can use dir name and upload most recent zip file
zip: "build/" + archiveName
}
}
}
}),
grunt.loadNpmTasks('grunt-webstore-upload');
grunt.registerTask('default', ['webstore_upload']);
};