mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-23 05:52:42 -05:00
circleci push release version to github
This commit is contained in:
parent
deb3745f77
commit
85ca4a73e3
1 changed files with 12 additions and 4 deletions
|
@ -29,13 +29,11 @@ aliases:
|
|||
command: |
|
||||
RELEASE_TIMESTAMP="$(date +'%Y%m%d%H%M%S')"
|
||||
VPKG=$($(npm bin)/json -f package.json version)
|
||||
export RELEASE_VERSION=${VPKG}-prerelease.${RELEASE_TIMESTAMP}
|
||||
echo $RELEASE_VERSION
|
||||
echo export RELEASE_VERSION=${VPKG}-prerelease.${RELEASE_TIMESTAMP} >> $BASH_ENV
|
||||
echo export NPM_TAG=latest >> $BASH_ENV
|
||||
if [[ "$CIRCLE_BRANCH" == hotfix/* ]]; then # double brackets are important for matching the wildcard
|
||||
echo export NPM_TAG=hotfix >> $BASH_ENV
|
||||
fi
|
||||
npm version --no-git-tag-version $RELEASE_VERSION
|
||||
- &deploy-gh-pages
|
||||
name: "deploy to gh pages"
|
||||
command: |
|
||||
|
@ -45,9 +43,17 @@ aliases:
|
|||
- &deploy-npm
|
||||
name: "deploy to npm"
|
||||
command: |
|
||||
echo $NPM_TAG
|
||||
echo "npm tag: $NPM_TAG"
|
||||
echo "release version: $RELEASE_VERSION"
|
||||
npm version --no-git-tag-version $RELEASE_VERSION
|
||||
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
|
||||
npm publish --tag $NPM_TAG
|
||||
- &tag-commit
|
||||
name: "tag commit in github"
|
||||
command: |
|
||||
echo $RELEASE_VERSION
|
||||
git tag $RELEASE_VERSION
|
||||
git push $CIRCLE_REPOSITORY_URL $RELEASE_VERSION
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
|
@ -84,6 +90,8 @@ jobs:
|
|||
<<: *deploy-gh-pages
|
||||
- run:
|
||||
<<: *deploy-npm
|
||||
- run:
|
||||
<<: *tag-commit
|
||||
|
||||
workflows:
|
||||
build-test-no-deploy:
|
||||
|
|
Loading…
Reference in a new issue