Skip to content

Add new release publisher yaml #61491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions azure-pipelines.release-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
trigger: none
pr: none

variables:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameters would work better; need to check that this is possible.

- name: _REMINDER
value: Review & undraft the release at https://github.com/microsoft/TypeScript/releases once it appears!
- name: PUBLISH_TAG
value: dev
- name: RELEASE_TITLE_NAME
value: 0.0.0 Test
- name: TAG_NAME
value: v0.0.0-SetMe

resources:
pipelines:
- pipeline: 'tgz'
project: 'TypeScript'
source: 'Release\TypeScript Release'
repositories:
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
pool:
name: TypeScript-AzurePipelines-EO
image: 1ESPT-Mariner2.0
os: linux

sdl:
sourceAnalysisPool:
name: TypeScript-AzurePipelines-EO
image: 1ESPT-Windows2022
os: windows

stages:
- stage: Stage_1
displayName: Publish tarball
jobs:
- job: Job_1
displayName: Agent job
condition: succeeded()
timeoutInMinutes: 0
templateContext:
templateContext:
type: releaseJob
isProduction: true
inputs:
- input: pipelineArtifact
pipeline: 'tgz'
artifactName: 'tgz'
targetPath: '$(Pipeline.Workspace)/tgz'
steps:
- task: CmdLine@2
displayName: Rename versioned drop to typescript.tgz
inputs:
script: |
pushd $(Pipeline.Workspace)/tgz
ls -lhR
mv typescript-*.tgz typescript.tgz
- task: Npm@1
displayName: npm publish tarball
inputs:
command: custom
workingDir: $(Pipeline.Workspace)/tgz
verbose: false
customCommand: publish $(Pipeline.Workspace)/tgz/typescript.tgz --tag $(PUBLISH_TAG)
customEndpoint: Typescript NPM
publishEndpoint: Typescript NPM

- stage: Stage_2
displayName: Publish git tag
dependsOn: Stage_1
jobs:
- job: Job_1
displayName: Agent job
condition: succeeded()
timeoutInMinutes: 0
templateContext:
type: releaseJob
isProduction: true
inputs:
- input: pipelineArtifact
pipeline: 'tgz'
artifactName: 'tgz'
targetPath: '$(Pipeline.Workspace)/tgz'
steps:
- task: GitHubRelease@1
displayName: GitHub release (create)
inputs:
gitHubConnection: typescript-bot connection
repositoryName: microsoft/TypeScript
tagSource: userSpecifiedTag
tag: $(TAG_NAME)
title: TypeScript $(RELEASE_TITLE_NAME)
releaseNotesSource: inline
releaseNotesInline: |
For release notes, check out the [release announcement]().
For new features, check out the [What's new in TypeScript $(TAG_NAME)]().
For the complete list of fixed issues, check out the
* [fixed issues query for Typescript $(TAG_NAME)](https://github.com/microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue+milestone%3A%22TypeScript+3.3%22+is%3Aclosed+).
Downloads are available on:
* [npm](https://www.npmjs.com/package/typescript)
assets: $(Pipeline.Workspace)/tgz/**/typescript-*.tgz
isDraft: true
addChangeLog: false