mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
build: allow publish from continous integration tool
This commit is contained in:
parent
bad85b70ba
commit
5efab2bbe5
2 changed files with 23 additions and 0 deletions
10
circle.yml
10
circle.yml
|
@ -29,3 +29,13 @@ test:
|
|||
- nvm alias default 8
|
||||
- yarn run test:ci
|
||||
- yarn run coverage:publish
|
||||
deployment:
|
||||
production:
|
||||
tag: /(v)?[0-9]+(\.[0-9]+)*/
|
||||
commands:
|
||||
- ./scripts/publish.sh
|
||||
general:
|
||||
branches:
|
||||
ignore:
|
||||
- gh-pages # list of branches to ignore
|
||||
- /release\/.*/ # or ignore regexes
|
||||
|
|
13
scripts/publish.sh
Executable file
13
scripts/publish.sh
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Get the last tag from GitHub
|
||||
lastTag=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||
|
||||
# Print it to the console for verification
|
||||
echo "Bumping version to new tag: ${lastTag}"
|
||||
|
||||
# Bump the version
|
||||
npm --no-git-tag-version version $lastTag
|
||||
|
||||
# Publish to NPM
|
||||
npm publish
|
Loading…
Reference in a new issue