-
-
Notifications
You must be signed in to change notification settings - Fork 5k
55 lines (48 loc) · 1.63 KB
/
release.yml
File metadata and controls
55 lines (48 loc) · 1.63 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Release a New Version
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
required: true
default: 'alpha'
type: choice
options:
- alpha
- alpha-minor
- alpha-major
- release-minor
- release-patch
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
if: github.repository == 'wwebjs/whatsapp-web.js'
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Configure Git
run: |
git config --global user.email "hello@wwebjs.dev"
git config --global user.name "WWebJS Bot"
- name: Bump version and publish to NPM
id: publish
run: ./tools/publish ${{ inputs.release_type }}
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
prerelease: ${{ steps.publish.outputs.PRERELEASE }}
generateReleaseNotes: true
tag: v${{ steps.publish.outputs.NEW_VERSION }}