-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
32 lines (30 loc) · 1.02 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 }}