pr: none trigger: none # Example: web-components_20201022.1 name: "web-components_${{ iif(parameters.dryRun, 'dryrun_', '') }}$(Date:yyyyMMdd)$(Rev:.r)" parameters: - name: dryRun displayName: Dry Run Mode type: boolean default: false variables: - group: 'Github and NPM secrets' - template: .devops/templates/variables.yml - name: release.web_components # Used to scope beachball to release only vnext packages value: true resources: repositories: - repository: 1esPipelines type: git name: 1ESPipelineTemplates/1ESPipelineTemplates ref: refs/tags/release schedules: # Triggers the nightly release # minute 0, hour 4 in UTC (5am in UTC+1), any day of month, any month, days 1-5 of week (M-F) # https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?tabs=yaml&view=azure-devops#supported-cron-syntax - cron: '0 4 * * 1-5' displayName: 'Daily release (M-F at 5am UTC+1)' branches: include: - master 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 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 parameters: dryRun: ${{ parameters.dryRun }} - script: | yarn nx run-many -t format:check lint test build -p tag:web-components --exclude vr-tests-web-components --nxBail displayName: Build, Test, Lint - template: .devops/templates/run-with-token.yml@self parameters: steps: - script: | yarn beachball publish --config scripts/beachball/src/release-web-components.config.js --message 'release: applying package updates - web-components' env: BEACHBALL_GIT_TOKEN: $(createToken.GITHUB_APP_TOKEN) BEACHBALL_NPM_TOKEN: $(npmToken) displayName: Publish changes and bump versions condition: and(succeeded(), not(${{ parameters.dryRun }}))