add build artifacts

This commit is contained in:
Pig Fang 2019-02-17 21:39:06 +08:00
parent 9386992fde
commit 5f0955c58f
2 changed files with 21 additions and 1 deletions

View File

@ -64,3 +64,21 @@ jobs:
inputs:
testRunner: JUnit
testResultsFiles: './junit.xml'
- job: build
displayName: Build & Compile
condition: ne(variables['Build.Reason'], 'PullRequest')
dependsOn:
- php
- javascript
pool:
vmImage: 'Ubuntu-16.04'
steps:
- script: yarn
displayName: Install dependencies
- script: yarn release blessing-skin-server.zip
displayName: Generate package
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'Package file'
targetPath: 'blessing-skin-server.zip'

View File

@ -6,7 +6,7 @@ module.exports = function () {
const list = fs.readFileSync('./zip.txt', 'utf-8').split('\n');
list.pop(); // Remove the empty line
const output = fs.createWriteStream(`../blessing-skin-server-v${version}.zip`);
const output = fs.createWriteStream(process.argv[2] || `../blessing-skin-server-v${version}.zip`);
const archive = archiver('zip', { zlib: { level: 9 } });
return new Promise((resolve, reject) => {
@ -34,3 +34,5 @@ module.exports = function () {
archive.finalize();
});
};
module.exports();