mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
33 lines
1008 B
YAML
33 lines
1008 B
YAML
name: release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
release_type:
|
|
description: "`alpha`, `alpha-minor`, `alpha-major` 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 "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 }}
|
|
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 }}
|