name: release on: workflow_dispatch: inputs: release_type: description: "`alpha`, `alpha-minor`, `alpha-major`, `release-minor`, `release-patch` release?" required: true default: "alpha" jobs: release: runs-on: ubuntu-latest if: ${{ github.repository == 'pedroslopez/whatsapp-web.js' }} permissions: contents: write id-token: write steps: - uses: actions/checkout@v4 with: token: ${{ secrets.RELEASE_GITHUB_TOKEN }} - run: git config --global user.email "hello@wwebjs.dev" - run: git config --global user.name "WWebJS Bot" - name: Bump version and publish to NPM id: publish run: ./tools/publish ${{ github.event.inputs.release_type }} - name: Create GitHub Release id: create_release uses: ncipollo/release-action@v1 with: prerelease: ${{ steps.publish.outputs.PRERELEASE }} generateReleaseNotes: true tag: v${{ steps.publish.outputs.NEW_VERSION }}