Skip to content

Commit 018086b

Browse files
Merge pull request #21 from microbit-foundation/publish-to-npm
Configure to publish to NPM.
2 parents db915b0 + be828f4 commit 018086b

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

.circleci/config.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,33 @@ jobs:
2626
- persist_to_workspace:
2727
root: ~/repo
2828
paths: .
29+
deploy:
30+
<<: *defaults
31+
steps:
32+
- attach_workspace:
33+
at: ~/repo
34+
- run:
35+
name: Configure registry auth
36+
command: echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> ~/repo/.npmrc
37+
- run:
38+
name: Publish package
39+
# For now we only publish on tags here and assume the version number is already correct.
40+
# If we change this then we need to automate updating the version number.
41+
command: npm publish $(if [ -z "$CIRCLE_TAG" ]; then echo "--tag next"; fi)
2942

3043
workflows:
3144
version: 2
3245
test-deploy:
3346
jobs:
34-
- test
47+
- test:
48+
filters:
49+
tags:
50+
only: /^v.*/
51+
- deploy:
52+
requires:
53+
- test
54+
filters:
55+
tags:
56+
only: /^v.*/
57+
branches:
58+
ignore: /.*/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@microbit-foundation/microbit-universal-hex",
2+
"name": "@microbit/microbit-universal-hex",
33
"version": "0.1.0",
44
"description": "Create micro:bit Universal Hexes.",
55
"keywords": [

0 commit comments

Comments
 (0)