diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index a26410c73baea609b34d990e3673aadf3952d109..b7286c4738e7dd7050c5d35ef168b50d5f7d277f 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -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 }} diff --git a/tools/dispatch-release.mjs b/tools/dispatch-release.mjs index 927d6e52b1e25432b36b6cfa9f7091f16d52c20c..3bdc53a23f53b7ecba8fcf112741b1f5c5a47431 100644 --- a/tools/dispatch-release.mjs +++ b/tools/dispatch-release.mjs @@ -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}`); diff --git a/tools/utils.mjs b/tools/utils.mjs index 6840a0236d3616b7b9f00ef0daa2a1b6d8aaf4d5..34e0d88af752c29addfca5b044dd7d1787307fe1 100644 --- a/tools/utils.mjs +++ b/tools/utils.mjs @@ -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);