48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: release
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- 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
|
|
|
|
# npm run compress:github
|
|
# npm run compress:azure
|
|
name: Build code
|
|
- name: Install GitVersion
|
|
uses: ./gitversion/setup
|
|
with:
|
|
versionSpec: '5.x'
|
|
- name: Use GitVersion
|
|
id: gitversion # step id used as reference for output values
|
|
uses: ./gitversion/execute
|
|
- run: |
|
|
$date = Get-Date -format "yyMMddHH"
|
|
$version = "${{steps.gitversion.outputs.majorMinorPatch}}.$date"
|
|
$major = "${{steps.gitversion.outputs.major}}"
|
|
$minor = "${{steps.gitversion.outputs.minor}}"
|
|
$patch = "${{steps.gitversion.outputs.patch}}"
|
|
|
|
. .\dist\azure\update-version.ps1 # Import the functions
|
|
update-manifest .\dist\azure\vss-extension.json -Version $version
|
|
dir -r .\dist\**\task.json | % { update-task $_ -Major $major -Minor $minor -Patch $patch }
|
|
|
|
npm run publish:azure -- --token ${{ secrets.TFX_TOKEN }}
|
|
|
|
shell: pwsh
|
|
name: Publish Azure extension
|