diff --git a/.travis.yml b/.travis.yml index 6e4b110..00fe42c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,12 +25,15 @@ jobs: # - npm run devInstall # - npm run build - stage: GitHub Release - script: skip + script: + - echo "deploying..." + before_deploy: + - node ci-deploy deploy: provider: releases prerelease: true api_key: "$GH_TOKEN" - skip_cleanup: true + cleanup: false file: # - builds/lightcord-win32-ia32.zip # - builds/lightcord-win32.exe diff --git a/ci-deploy.js b/ci-deploy.js new file mode 100644 index 0000000..2da483f --- /dev/null +++ b/ci-deploy.js @@ -0,0 +1,8 @@ +const package = require("./package.json") +const child_process = require("child_process") + +const version = package.version+"-"+Date.now()+ "-" + child_process.execSync("git rev-parse HEAD").toString().split("\n")[0].trim().slice(0, 7) + +child_process.execSync("git tag "+version) + +console.log(`Set up tag as ${version}`) \ No newline at end of file diff --git a/package.json b/package.json index c9378eb..7fd62a5 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "clean:all": "node scripts/clean.js --all", "devInstall": "npm i --save-dev --arch=ia32 electron@10.1.1 && node installSubModules.js && echo \"Everything is installed. You should be able to do npm run test to compile everything and launch.\"", "devInstall:64": "npm i --save-dev --arch=x64 electron@10.1.1 && node installSubModules.js && echo \"Everything is installed. You should be able to do npm run test to compile everything and launch.\"", - "versions": "echo Electron: && electron -v && echo Typescript: && tsc -v" + "versions": "echo Electron: && electron -v && echo Typescript: && tsc -v", + "ci": "node ci-deploy" }, "author": "JeanOUINA", "license": "MIT",