diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a42fda84d..e09a0129b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -29,11 +29,21 @@ jobs: # run tests just in case - run: npm test - run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" - # publish to NPM - - run: npm publish --tag ${{ github.event.release.target_commitish }} + + - name: publish to NPM alpha version + if: '!github.event.release.prerelease' + run: npm publish --tag latest + env: + # Use a token to publish to NPM. See below for how to set it up + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: publish to NPM beta version + if: 'github.event.release.prerelease' + run: npm publish --tag beta env: # Use a token to publish to NPM. See below for how to set it up NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + # push the version changes to GitHub - run: git push origin HEAD:master env: diff --git a/package.json b/package.json index 7b142c3a4..5b5c10f41 100644 --- a/package.json +++ b/package.json @@ -39,9 +39,6 @@ "pre-commit": "tsdx lint && npm prettier" } }, - "publishConfig": { - "tag": "latest" - }, "prettier": { "printWidth": 80, "semi": true,