Files
Umbraco-CMS/build/templates/backoffice-install.yml
Jacob Overgaard 2122af7e96 V14: Build and release the type declarations of the Backoffice to npm (#16718)
* separate backoffice install into its own template

* add new job to build the backoffice npm package

* move location of templates

* set version, then build, then pack

* use nbgv to get just the NpmPackageVersion

* calculate version earlier and for both builds

* merge two tasks

* add Build keyword to the display name

* get the node version from the backoffice

* update backoffice submodule

* bump npm version before restoring cache to ensure the cache key doesn't change

* add template to umbraco.sln
2024-07-01 12:23:58 +02:00

32 lines
1.0 KiB
YAML

steps:
- task: NodeTool@0
displayName: Use Node.js
retryCountOnTaskFailure: 3
inputs:
versionSource: 'fromFile'
versionFilePath: src/Umbraco.Web.UI.Client/.nvmrc
- bash: |
echo "##[command]Install nbgv"
dotnet tool install --tool-path . nbgv
echo "##[command]Running nbgv get-version"
PACKAGE_VERSION=$(nbgv get-version -v NpmPackageVersion)
echo "##[command]Running npm version"
echo "##[debug]Version: $PACKAGE_VERSION"
cd src/Umbraco.Web.UI.Client
npm version $PACKAGE_VERSION --allow-same-version --no-git-tag-version
displayName: Set NPM Version
- task: Cache@2
displayName: Cache node_modules
inputs:
key: '"npm_client" | "$(Agent.OS)"| $(Build.SourcesDirectory)/src/Umbraco.Web.UI.Client/package-lock.json'
restoreKeys: |
"npm_client" | "$(Agent.OS)"
"npm_client"
path: $(npm_config_cache)
- script: npm ci --no-fund --no-audit --prefer-offline
displayName: Run npm ci (Bellissima)
workingDirectory: src/Umbraco.Web.UI.Client