-
Notifications
You must be signed in to change notification settings - Fork 160
feat: Release and pre-release pipelines with publish script #224
Conversation
42c660c to
b56cf53
Compare
wbreza
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
3b8e6b1 to
da75799
Compare
PIC123
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
pipelines/publish-release.yml
Outdated
|
|
||
| - task: Bash@3 | ||
| name: BumpNpmVersion | ||
| displayName: Bump NPM Prerelease Version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: would we want this to be just Release version?
| # GITHUB_ACCESS_TOKEN | ||
|
|
||
| PACKAGE_NAME=$1 | ||
| NPM_RELEASE_TYPE=${2-"prerelease"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we will just have prerelease release types?
| filePath: ./scripts/version.sh | ||
| arguments: 'serverless/serverless-azure-functions' | ||
| env: | ||
| NPM_TOKEN: $(NPM_TOKEN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend creating Variable Groups in AzDO and referencing them here, so that you don't have to add the variables after pipeline creation
| filePath: ./scripts/publish.sh | ||
| arguments: 'prerelease' | ||
| env: | ||
| NPM_TOKEN: $(NPM_TOKEN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
pipelines/publish-release.yml
Outdated
| filePath: ./scripts/version.sh | ||
| arguments: 'serverless/serverless-azure-functions' | ||
| env: | ||
| NPM_TOKEN: $(NPM_TOKEN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use variable group
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need GITHUB_ACCESS_TOKEN here, not NPM_TOKEN
scripts/version.sh
Outdated
| git checkout ${SOURCE_BRANCH_NAME} | ||
| echo Checked out branch: ${SOURCE_BRANCH_NAME} | ||
|
|
||
| NPM_VERSION=`npm version ${NPM_RELEASE_TYPE} -m "Update version ${NPM_RELEASE_TYPE} ***NO_CI***"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change the commit msg to "release: Bump ${NPM_RELEASE_TYPE} to %s NO_CI"
Pipelines for release and pre-release on merges to master and dev respectively. Dev branch will release a beta to NPM and Master will release a patch to NPM Resolves [AB#588]
Pipelines for release and pre-release on merges to master and dev respectively. Dev branch will release a beta to NPM and Master will release a patch to NPM
Pipelines not set up yet - still need approval from serverless org to run Azure DevOps on the repo
Resolves [AB#588]