Skip to content

Commit

Permalink
Set npm dist-tag to "next" for prerelease versions
Browse files Browse the repository at this point in the history
  • Loading branch information
georgestagg committed Jul 27, 2023
1 parent 5649ffe commit feccde6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: Set npm dist-tag to "next" if pre-release version
if: contains(github.ref_name, '-dev') || contains(github.ref_name, '-rc')
run: echo "DIST_TAG=next" >> $GITHUB_ENV
- name: Set the webR CDN URL as the BASE_URL
run: echo "BASE_URL=https://webr.r-wasm.org/${{ github.ref_name }}/" > "$HOME/.webr-config.mk"
- name: Configure webR for flang
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ package: $(PKG_DIST)/webr.mjs $(PKG_DIST)/vfs
npm pack
rm -rf "$(PKG_DIST)"

DIST_TAG ?= "latest"
.PHONY: publish
publish: $(PKG_DIST)/webr.mjs $(PKG_DIST)/vfs
npm publish --access=public
npm publish --access=public --tag $(DIST_TAG)
rm -rf "$(PKG_DIST)"

# Prepare the PKG_DIST directory for npm packaging and/or publication.
Expand Down

0 comments on commit feccde6

Please sign in to comment.