diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abff02f..8d9177d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,10 @@ jobs: - uses: actions/checkout@v4 with: token: ${{ secrets.RELEASE_GITHUB_TOKEN }} + - uses: actions/setup-node@v4 + with: + node-version: '24' + registry-url: 'https://registry.npmjs.org' - run: git config --global user.email "hello@wwebjs.dev" - run: git config --global user.name "WWebJS Bot" - name: Bump version and publish to NPM diff --git a/tools/publish b/tools/publish index fab9883..54df743 100755 --- a/tools/publish +++ b/tools/publish @@ -68,29 +68,36 @@ echo "" echo "-----> BUMP VERSION" echo "" -npm version $VERSION_ARGS - -git push && git push --tags +npm version $VERSION_ARGS --no-git-tag-version NEW_VERSION=$(cat package.json | jq -r .version) echo "New Version: $NEW_VERSION" +echo "" +echo "-----> GENERATE DOCS" +echo "" + npm install npm run generate-docs -git add . - -git commit -am "chore(${NEW_VERSION}): generate docs" - -git push - echo "" echo "-----> PUSH TO NPM" echo "" npm publish --tag $DIST_TAG +echo "" +echo "-----> PUSH TO GIT" +echo "" + +git add . + +git commit -am "chore(v${NEW_VERSION}): bump version and generate docs" + +git tag "v${NEW_VERSION}" + +git push && git push --tags echo "" echo "-----> Done!"