-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.48 KB
/
ci.yaml
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
name: Generate Changelog and Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install pnpm package manager
run: npm install -g pnpm
- name: Install Dependencies
run: pnpm install
- name: Generate Changelog
run: pnpm run generate:changelog
- name: Create Release Commit and Tag
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add CHANGELOG.md
git commit -m "chore(changelog): update CHANGELOG.md"
git tag v$(node -p "require('./package.json').version")
git push origin HEAD:main --tags
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v$(node -p "require('./package.json').version")
release_name: Release v$(node -p "require('./package.json').version")
body_path: CHANGELOG.md
draft: false
prerelease: false