actually building the code in the CI

This commit is contained in:
Artur Stolear
2020-01-22 19:22:22 +02:00
parent ee69b451cc
commit 0eae1609b6
3 changed files with 13 additions and 4 deletions

View File

@@ -13,6 +13,11 @@ jobs:
- name: Fetch all history for all tags and branches - name: Fetch all history for all tags and branches
run: | run: |
git fetch --prune --unshallow git fetch --prune --unshallow
- run: |
npm install
npm run build:github
npm run build:azure
name: Build code
- name: Install GitVersion - name: Install GitVersion
uses: ./setup-gitversion uses: ./setup-gitversion
with: with:

View File

@@ -15,6 +15,11 @@ jobs:
- name: Fetch all history for all tags and branches - name: Fetch all history for all tags and branches
run: | run: |
git fetch --prune --unshallow git fetch --prune --unshallow
- run: |
npm install
npm run build:github:prod
npm run build:azure:prod
name: Build code
- name: Install GitVersion - name: Install GitVersion
uses: ./setup-gitversion uses: ./setup-gitversion
with: with:
@@ -23,7 +28,6 @@ jobs:
id: gitversion # step id used as reference for output values id: gitversion # step id used as reference for output values
uses: ./execute-gitversion uses: ./execute-gitversion
- run: | - run: |
npm install
$date = Get-Date -format "yyMMddHHmm" $date = Get-Date -format "yyMMddHHmm"
$version = "${{steps.gitversion.outputs.majorMinorPatch}}.$date" $version = "${{steps.gitversion.outputs.majorMinorPatch}}.$date"
$major = "${{steps.gitversion.outputs.major}}" $major = "${{steps.gitversion.outputs.major}}"
@@ -34,6 +38,6 @@ jobs:
update-task .\dist\azure\setup-gitversion\task.json -Major $major -Minor $minor update-task .\dist\azure\setup-gitversion\task.json -Major $major -Minor $minor
update-task .\dist\azure\execute-gitversion\task.json -Major $major -Minor $minor update-task .\dist\azure\execute-gitversion\task.json -Major $major -Minor $minor
npm run publish-azure -- --token ${{ secrets.TFX_TOKEN }} npm run publish:azure -- --token ${{ secrets.TFX_TOKEN }}
shell: pwsh shell: pwsh
name: Publish Azure extension name: Publish Azure extension

View File

@@ -16,7 +16,7 @@
"build:github:prod": "npm run build:github -- --env.mode=production", "build:github:prod": "npm run build:github -- --env.mode=production",
"build": "npm run build:mock && npm run build:azure && npm run build:github", "build": "npm run build:mock && npm run build:azure && npm run build:github",
"build:prod": "npm run build:mock:prod && npm run build:azure:prod && npm run build:github:prod", "build:prod": "npm run build:mock:prod && npm run build:azure:prod && npm run build:github:prod",
"publish-azure": "tfx extension publish --root ./dist/azure --no-wait-validation --auth-type pat" "publish:azure": "tfx extension publish --root ./dist/azure --no-wait-validation --auth-type pat"
}, },
"author": "GitTools", "author": "GitTools",
"contributors": [ "contributors": [