@@ -469,35 +469,22 @@ jobs:
469
469
- run : yarn build
470
470
- run : yarn remove @instabug/danger-plugin-coverage
471
471
- run :
472
- name : Remove build files from .gitignore
473
- command : sed -i '/dist/d' .gitignore && sed -i '/bin/d' .gitignore
474
- - run :
475
- name : Get snapshot branch name
476
- command : |
477
- source scripts/snapshot-branch.sh
478
- echo "export SNAPSHOT_BRANCH=$SNAPSHOT_BRANCH" >> "$BASH_ENV"
479
- - run :
480
- name : Setup Git
481
- command : |
482
- git config --global user.name "Instabug-CP-CI"
483
- git config --global user.email [email protected]
484
- - run :
485
- name : Create snapshot branch
486
- command : git checkout -b $SNAPSHOT_BRANCH
487
- - run :
488
- name : Commit changes
472
+ name : Get snapshot version
489
473
command : |
490
- git add .
491
- git commit -m "chore: add generate files "
474
+ source scripts/snapshot-version.sh
475
+ echo "export SNAPSHOT_VERSION=$SNAPSHOT_VERSION" >> "$BASH_ENV "
492
476
- run :
493
- name : Push snapshot
494
- command : git push --force origin $SNAPSHOT_BRANCH
477
+ name : Authorize with NPM
478
+ command : echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
479
+ - run : npm version $SNAPSHOT_VERSION --no-git-tag-version
480
+ - run : npm publish --tag snapshot
495
481
- run :
496
482
name : Install jq
497
483
command : sudo apt-get update && sudo apt-get install -y jq
498
- - run :
499
- name : Replace snapshot branch in comment template
500
- command : sed -i "s|{BRANCH}|$SNAPSHOT_BRANCH|g" scripts/snapshot-comment.md
484
+ - find_and_replace :
485
+ files : scripts/snapshot-comment.md
486
+ search : ' {VERSION}'
487
+ replace : $SNAPSHOT_VERSION
501
488
- notify_github :
502
489
data : " $(jq -Rcs '{ body: . }' scripts/snapshot-comment.md)"
503
490
0 commit comments