Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Commit

Permalink
Add Release Note (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
LianwMS authored May 29, 2020
1 parent cf51091 commit 249b779
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 11 deletions.
43 changes: 32 additions & 11 deletions azure-pipelines/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,22 @@ stages:
echo "[$(date -u)] LOG: CURRENT VERSION: $CURRENT_VERSION"
RELEASE_VERSION="$CURRENT_VERSION-b.$VAR_BUILD_NUMBER"
echo "[$(date -u)] LOG: RELEASE VERSION: $RELEASE_VERSION"
RELEAST_NOTE="Adding \"--use=$(Build.Repository.Uri)/releases/download/$RELEASE_VERSION/autorest-az-$CURRENT_VERSION.tgz\" argument when triggering \"autorest\" or \"gen\" command to generate code"
echo "[$(date -u)] LOG: RELEASE NOTE: $RELEAST_NOTE"
echo "##vso[task.setvariable variable=release;isOutput=true]$RELEASE_VERSION"
echo "##vso[task.setvariable variable=note;isOutput=true]$RELEAST_NOTE"
name: GetVersions
- task: GitHubRelease@1
inputs:
gitHubConnection: 'amecodegenbot'
repositoryName: 'Azure/autorest.az'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: '$(GetVersions.release)'
title: 'autorest.az $(GetVersions.release)'
releaseNotesSource: 'inline'
releaseNotesInline: '$(GetVersions.note)'
assets: |
$(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY)/$(VAR_ARIFACT_NAME)/*.tgz
isPreRelease: true
Expand Down Expand Up @@ -144,6 +150,7 @@ stages:
displayName: Publish
#failOnStderr: true
- stage: Version
dependsOn: PublicRelease
condition: succeeded()
Expand All @@ -156,6 +163,30 @@ stages:
inputs:
versionSpec: '10.17.0'
displayName: 'Install Node.js'
- task: DownloadBuildArtifacts@0
inputs:
buildType: 'current'
downloadType: 'single'
artifactName: '$(VAR_ARIFACT_NAME)'
downloadPath: '$(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY)'
- script: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "[$(date -u)] LOG: CURRENT VERSION: $CURRENT_VERSION"
echo "##vso[task.setvariable variable=release;isOutput=true]$CURRENT_VERSION"
name: GetVersions
- task: GitHubRelease@1
inputs:
gitHubConnection: 'amecodegenbot'
repositoryName: '$(Build.Repository.Name)'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: '$(GetVersions.release)'
title: 'autorest.az $(GetVersions.release)'
assets: |
$(VAR_BUILD_ARTIFACT_STAGING_DIRECTORY)/$(VAR_ARIFACT_NAME)/*.tgz
releaseNotesFilePath: './doc/RELEASE_NOTE.md'
addChangeLog: false
- script: |
REPO_URL_REPLACE="$(USER_GITHUB_TOKEN)@github"
REPO_URL_PAT=${VAR_REPO_URL/'github'/$REPO_URL_REPLACE}
Expand All @@ -166,16 +197,6 @@ stages:
git remote add originpat $REPO_URL_PAT
git remote -v
displayName: 'Config'
- script: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
echo "[$(date -u)] LOG: CURRENT VERSION: $CURRENT_VERSION"
echo "[$(date -u)] LOG: ADD TAG: $CURRENT_VERSION"
git tag $CURRENT_VERSION
echo "[$(date -u)] LOG: PUSH TAG:"
git push originpat --tags
displayName: 'Add Public Release Tag'
- script: |
echo "[$(date -u)] LOG: CHECKOUT TO $VAR_REPO_BRANCHNAME"
git checkout $VAR_REPO_BRANCHNAME -f
Expand Down
9 changes: 9 additions & 0 deletions doc/RELEASE_NOTE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# What's New

# User Guidelines
* For user guidelines, please refer to [Guideline Document](https://github.com/Azure/autorest.az/blob/master/doc/how-to-generate.md)
* For other document, please refer to [FAQ](https://github.com/Azure/autorest.az/blob/master/doc/faq.md)

# Support
* For any issue found, please file issue at [Github](https://github.com/Azure/autorest.az/issues), Please also file issue to us if you find some doc is missing or more detail is needed.
* Please use [AME CodeGen Teams Channel](https://teams.microsoft.com/l/channel/19%3a031673a5362e4ff18bd7886a4ac7798a%40thread.skype/CodeGen?groupId=de995b1a-16c1-4cc7-a49b-bc9f90bc6acd&tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47) for quick support and questions.

0 comments on commit 249b779

Please sign in to comment.