Skip to content

Commit

Permalink
publish npm package via pipeline on release (#1158)
Browse files Browse the repository at this point in the history
Signed-off-by: Jari Kolehmainen <[email protected]>
  • Loading branch information
jakolehm authored Oct 27, 2020
1 parent 7e3ebcf commit b765ee1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b765ee1

Please sign in to comment.