From b765ee11bbffc2a8be3c8dc827616a151fb4c6b0 Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Tue, 27 Oct 2020 17:06:56 +0200 Subject: [PATCH] publish npm package via pipeline on release (#1158) Signed-off-by: Jari Kolehmainen --- .azure-pipelines.yml | 5 +++++ Makefile | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 009418b1c0..56e5fbe57e 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -149,6 +149,11 @@ jobs: condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" env: GH_TOKEN: $(GH_TOKEN) + - script: make publish-npm + displayName: Publish npm package + condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" + env: + NPM_TOKEN: $(NPM_TOKEN) - bash: | mkdir -p "$AZURE_CACHE_FOLDER" tar -czf "$AZURE_CACHE_FOLDER/yarn-cache.tar.gz" "$YARN_CACHE_FOLDER" diff --git a/Makefile b/Makefile index 540a8ca0e4..0a1b14baf5 100644 --- a/Makefile +++ b/Makefile @@ -59,10 +59,11 @@ build-extensions: $(foreach dir, $(wildcard $(EXTENSIONS_DIR)/*), $(MAKE) -C $(dir) build;) build-npm: + yarn compile:extension-rollup yarn npm:fix-package-version publish-npm: build-npm - cd src/extensions/npm/extensions && npm publish + cd src/extensions/npm/extensions && npm publish --access=public clean: ifeq "$(DETECTED_OS)" "Windows"