diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fef9a640..ae2e3d57 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,6 +30,8 @@ jobs: node-version: 16 registry-url: "https://registry.npmjs.org" - run: yarn install --frozen-lockfile - - run: npm publish + - run: | + TAG=$(echo $GITHUB_REF_NAME | grep -oP '^v\d+\.\d+\.\d+-?\K(\w+)?') + npm publish --tag ${TAG:-latest} env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}