-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (50 loc) · 1.47 KB
/
release.yml
File metadata and controls
58 lines (50 loc) · 1.47 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
56
57
58
name: Release Version
run-name: Release Version ${{ inputs.version }}
concurrency:
group: release-new-version
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
version:
description: NPM Version
required: true
type: string
env:
NPM_VERSION: ${{ inputs.version }}
jobs:
github-actions:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: 24
- run: npm version --no-git-tag-version ${{ env.NPM_VERSION }}
- uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --tag v${{ env.NPM_VERSION }}
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit package.json and CHANGELOG.md
uses: ryancyq/github-signed-commit@v1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
package.json
package-lock.json
CHANGELOG.md
commit-message: "release: Bump version for ${{ env.NPM_VERSION }}"
tag: v${{ env.NPM_VERSION }}
- name: Create GitHub Release
run: gh release create v${{ env.NPM_VERSION }} --title "v${{ env.NPM_VERSION }}" --generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}