Skip to content

Commit 1e5c9d9

Browse files
authored
Set NPM tag depending on release status (#7615)
1 parent 4d088fa commit 1e5c9d9

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/npm.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ jobs:
2727

2828
- name: Fetch NPM Package from release
2929
run: |
30-
cd js/ccf-app
30+
set -ex
3131
wget https://github.com/microsoft/CCF/releases/download/ccf-${{steps.tref.outputs.version}}/microsoft-ccf-app-${{steps.tref.outputs.version}}.tgz
32+
echo "registry=https://registry.npmjs.org/" > .npmrc
33+
working-directory: js/ccf-app
3234

3335
- name: Publish NPM Package to https://www.npmjs.com/package/@microsoft/ccf-app
34-
run: |
35-
set -ex
36-
cd js/ccf-app
37-
echo "registry=https://registry.npmjs.org/" > .npmrc
38-
npm publish microsoft-ccf-app*.tgz --access public
36+
run: npm publish microsoft-ccf-app*.tgz --access public --tag ${{ github.event.release.prerelease && 'dev' || 'latest' }}
37+
working-directory: js/ccf-app

0 commit comments

Comments
 (0)