fix(ci): set up OIDC machine, avoid pushing incomplete version commits

This commit is contained in:
Pedro S Lopez 2026-01-05 01:50:19 -04:00
commit 04c1d0c415
2 changed files with 20 additions and 9 deletions

View file

@ -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

View file

@ -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!"