Files
actions/.github/workflows/release.yml
2020-01-25 08:48:01 +02:00

43 lines
1.2 KiB
YAML

name: release
on:
release:
types: [published]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow
- run: |
npm install
npm run build:github
npm run build:azure
name: Build code
- name: Install GitVersion
uses: ./gitversion/setup
with:
versionSpec: '5.1.2'
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: ./gitversion/execute
- run: |
$date = Get-Date -format "yyMMddHHmm"
$version = "${{steps.gitversion.outputs.majorMinorPatch}}.$date"
$major = "${{steps.gitversion.outputs.major}}"
$minor = "${{steps.gitversion.outputs.minor}}"
. .\dist\azure\update-version.ps1
update-manifest .\dist\azure\vss-extension.json -Version $version
dir -r .\dist\**\task.json | % { update-task $_ -Major $major -Minor $minor }
npm run publish:azure -- --token ${{ secrets.TFX_TOKEN }}
shell: pwsh
name: Publish Azure extension