Make an NPM release via GitHub (#2942)
* Update release.yml * Update publish * Update release.yml * Update publish * Update publish: publish new docs before new version release * Update publish * Update publish --------- Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
parent
41b280c769
commit
9847ebadb9
2 changed files with 20 additions and 1 deletions
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
|
@ -4,7 +4,7 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
release_type:
|
release_type:
|
||||||
description: "`alpha`, `alpha-minor`, `alpha-major` release?"
|
description: "`alpha`, `alpha-minor`, `alpha-major`, `release-minor`, `release-patch` release?"
|
||||||
required: true
|
required: true
|
||||||
default: "alpha"
|
default: "alpha"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,16 @@ then
|
||||||
PRERELEASE='true'
|
PRERELEASE='true'
|
||||||
VERSION_ARGS="premajor --preid alpha"
|
VERSION_ARGS="premajor --preid alpha"
|
||||||
DIST_TAG="next"
|
DIST_TAG="next"
|
||||||
|
elif [[ "$RELEASE_MODE" == "release-patch" ]]
|
||||||
|
then
|
||||||
|
PRERELEASE='false'
|
||||||
|
VERSION_ARGS="patch"
|
||||||
|
DIST_TAG="latest"
|
||||||
|
elif [[ "$RELEASE_MODE" == "release-minor" ]]
|
||||||
|
then
|
||||||
|
PRERELEASE='false'
|
||||||
|
VERSION_ARGS="minor"
|
||||||
|
DIST_TAG="latest"
|
||||||
else
|
else
|
||||||
echo 'Release Mode required'
|
echo 'Release Mode required'
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -57,8 +67,17 @@ echo "-----> BUMP VERSION"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
npm version $VERSION_ARGS || exit 1
|
npm version $VERSION_ARGS || exit 1
|
||||||
|
|
||||||
git push && git push --tags || exit 1
|
git push && git push --tags || exit 1
|
||||||
|
|
||||||
|
npm run generate-docs
|
||||||
|
|
||||||
|
git add .
|
||||||
|
|
||||||
|
git commit -am "chore(${NEW_VERSION}): generate docs"
|
||||||
|
|
||||||
|
git push
|
||||||
|
|
||||||
NEW_VERSION=`cat package.json | jq -r .version`
|
NEW_VERSION=`cat package.json | jq -r .version`
|
||||||
echo "New Version: $NEW_VERSION"
|
echo "New Version: $NEW_VERSION"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue