2019-10-31 09:13:24 +03:00
|
|
|
pr: none
|
|
|
|
|
|
|
|
trigger: none
|
|
|
|
|
2020-10-24 05:08:11 +03:00
|
|
|
name: '$(targetNpmVersion) ($(Rev:r))'
|
|
|
|
|
2023-09-20 22:13:41 +03:00
|
|
|
parameters:
|
|
|
|
- name: isTestRun
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
|
2021-03-03 03:04:12 +03:00
|
|
|
variables:
|
|
|
|
- template: .devops/templates/variables.yml
|
2022-03-04 01:44:07 +03:00
|
|
|
- name: tags
|
|
|
|
value: production,externalfacing
|
|
|
|
|
2023-10-31 19:53:34 +03:00
|
|
|
resources:
|
|
|
|
repositories:
|
|
|
|
- repository: 1esPipelines
|
|
|
|
type: git
|
|
|
|
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
|
|
|
ref: refs/tags/release
|
|
|
|
|
|
|
|
extends:
|
|
|
|
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
|
|
|
|
parameters:
|
|
|
|
pool:
|
|
|
|
name: Azure-Pipelines-1ESPT-ExDShared
|
|
|
|
image: windows-latest
|
|
|
|
os: windows # We need windows because compliance task only run on windows.
|
|
|
|
stages:
|
|
|
|
- stage: main
|
|
|
|
jobs:
|
|
|
|
- job: Release
|
|
|
|
dependsOn: Compliance
|
|
|
|
pool:
|
|
|
|
name: '1ES-Host-Ubuntu'
|
|
|
|
image: '1ES-PT-Ubuntu-20.04'
|
|
|
|
os: linux
|
|
|
|
workspace:
|
|
|
|
clean: all
|
|
|
|
templateContext:
|
|
|
|
outputs:
|
|
|
|
- output: pipelineArtifact
|
|
|
|
targetPath: $(System.DefaultWorkingDirectory)
|
|
|
|
artifactName: output
|
|
|
|
steps:
|
|
|
|
- template: .devops/templates/tools.yml@self
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
node -e "if('$(targetNpmVersion)' === '') throw new Error('targetNpmVersion is not specified');"
|
|
|
|
displayName: 'Checking for targetNpmVersion variable'
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
npm install semver
|
|
|
|
node -e "let semver = require('semver');if(semver.valid('$(targetNpmVersion)') === null){ throw new Error('Invalid version specified'); }"
|
|
|
|
displayName: 'Check targetNpmVersion is valid semver'
|
|
|
|
|
|
|
|
- task: Bash@3
|
|
|
|
inputs:
|
|
|
|
filePath: yarn-ci.sh
|
|
|
|
displayName: yarn
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
npm version $(targetNpmVersion)
|
|
|
|
workingDirectory: 'packages/react'
|
|
|
|
displayName: 'Manually set package version'
|
|
|
|
|
|
|
|
- script: |
|
2024-07-31 16:11:41 +03:00
|
|
|
yarn nx run react:build --production
|
2023-10-31 19:53:34 +03:00
|
|
|
displayName: yarn build to FUIR (Create production build)
|
|
|
|
|
|
|
|
- script: yarn workspace @fluentui/react bundle --production
|
|
|
|
displayName: yarn bundle FUIR
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
npm pack
|
|
|
|
displayName: 'Create tarball'
|
|
|
|
workingDirectory: 'packages/react'
|
|
|
|
|
|
|
|
- ${{ if ne(parameters.isTestRun, true) }}:
|
|
|
|
- script: |
|
|
|
|
npm publish packages/react/react-$(targetNpmVersion).tgz --tag hf8 --//registry.npmjs.org/:_authToken=$(npmToken)
|
|
|
|
displayName: Publish new version
|
|
|
|
|
|
|
|
- template: .devops/templates/cleanup.yml@self
|
|
|
|
parameters:
|
|
|
|
checkForModifiedFiles: false
|