diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 25624f0..4635ef9 100755 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -13,9 +13,18 @@ jobs: with: node-version: 18 registry-url: https://registry.npmjs.org/ - - run: npm --no-git-tag-version --allow-same-version version ${{ github.event.release.name }} - - run: npm install - - run: npm run build - - run: npm publish --access public + - name: Release latest package + run: | + npm --no-git-tag-version --allow-same-version version ${{ github.event.release.name }} + npm install + npm run build + npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}} + - name: Release next package + run: | + npm version --no-git-tag-version --allow-same-version ${{ github.event.release.name }}-dev + npm version prerelease --no-git-tag-version --allow-same-version --preid beta + npm publish --tag next env: NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_TOKEN}}