Skip to content

release

release #29

Workflow file for this run

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' }}
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
- run: git config --global user.email "[email protected]"
- 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 }}
env:
NPM_TOKEN: ${{ secrets.RELEASE_NPM_TOKEN }}
- 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 }}