Skip to content

Commit

Permalink
build: add autopublish deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
@jotadeveloper authored and sergiohgz committed Aug 13, 2019
1 parent 616cf53 commit 9f0ba84
Show file tree
Hide file tree
Showing 3 changed files with 3,697 additions and 2 deletions.
19 changes: 17 additions & 2 deletions plugins/local-storage/circle.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
machine:
environment:
YARN_VERSION: 0.27.5
YARN_VERSION: 1.3.2
PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
node:
version: 8
version: 9
dependencies:
pre:
- 'echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc'
- |
if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
fi
- nvm install 4
- nvm install 6
- nvm install 8

cache_directories:
- ~/.yarn
Expand All @@ -27,3 +29,16 @@ test:
- yarn run test
- nvm alias default 8
- yarn run test
- nvm alias default 9
- yarn run test
deployment:
production:
tag: /(v)?[0-9]+(\.[0-9]+)*/
commands:
- ./scripts/publish.sh
general:
branches:
ignore:
- gh-pages # list of branches to ignore
- l10n_website
- /release\/.*/ # or ignore regexes
10 changes: 10 additions & 0 deletions plugins/local-storage/scripts/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/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}"

# Publish to NPM
npm publish
Loading

0 comments on commit 9f0ba84

Please sign in to comment.