Skip to content

Commit

Permalink
build: fix npm release (#9672)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Apr 21, 2021
1 parent d4d24b7 commit 1c2add8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release-npm.yml
Expand Up @@ -51,6 +51,7 @@ jobs:
- name: Publish ${{ github.event.client_payload.version }}
run: |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ~/.npmrc
npm publish --tag ${{ github.event.client_payload.tag }}
npm publish --tag ${TAG:-latest}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ github.event.client_payload.tag }}
2 changes: 1 addition & 1 deletion tools/dispatch-release.mjs
Expand Up @@ -3,7 +3,7 @@ import shell from 'shelljs';
import { options } from './utils.mjs';

const version = options.release;
const tag = options.tag;
const tag = options.tag || 'latest';
const dry = options.dryRun;

shell.echo(`Dispatching version: ${version}`);
Expand Down
2 changes: 1 addition & 1 deletion tools/utils.mjs
Expand Up @@ -6,7 +6,7 @@ program
.version('0.0.1')
.requiredOption('-r, --release <type>', 'Version to use')
.option('-s, --sha <type>', 'Git sha to use')
.option('-t, --tag <type>', 'Npm dist-tag to publish to', 'latest')
.option('-t, --tag <type>', 'Npm dist-tag to publish to')
.option('-d, --dry-run');

program.parse(process.argv);
Expand Down

0 comments on commit 1c2add8

Please sign in to comment.