Skip to content

Commit

Permalink
Merge pull request #21 from microbit-foundation/publish-to-npm
Browse files Browse the repository at this point in the history
Configure to publish to NPM.
  • Loading branch information
microbit-carlos authored Nov 3, 2020
2 parents db915b0 + be828f4 commit 018086b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
26 changes: 25 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,33 @@ jobs:
- persist_to_workspace:
root: ~/repo
paths: .
deploy:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run:
name: Configure registry auth
command: echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> ~/repo/.npmrc
- run:
name: Publish package
# For now we only publish on tags here and assume the version number is already correct.
# If we change this then we need to automate updating the version number.
command: npm publish $(if [ -z "$CIRCLE_TAG" ]; then echo "--tag next"; fi)

workflows:
version: 2
test-deploy:
jobs:
- test
- test:
filters:
tags:
only: /^v.*/
- deploy:
requires:
- test
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@microbit-foundation/microbit-universal-hex",
"name": "@microbit/microbit-universal-hex",
"version": "0.1.0",
"description": "Create micro:bit Universal Hexes.",
"keywords": [
Expand Down

0 comments on commit 018086b

Please sign in to comment.