-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.64 KB
/
release.yml
File metadata and controls
56 lines (46 loc) · 1.64 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
name: 📋 Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: ⎔ Setup node
uses: actions/setup-node@v4.4.0
with:
node-version: 18
- name: 📄 Update package.json to only include prettier
run: |
updated=`cat package.json | jq 'del(.dependencies) | .devDependencies |= (to_entries | map(select(.key | match("prettier";"i"))) | from_entries)'`
echo $updated > package.json
- name: 💿 Install prettier
run: npm install
- name: 📝 Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1.10.3
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
excludeTypes: build,docs
- name: 📦 Create Release
uses: ncipollo/release-action@v1.21.0
with:
allowUpdates: true
draft: false
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}
- name: 🎨 Format CHANGELOG.md
run: npx prettier --write CHANGELOG.md
- name: ⬆️ Commit CHANGELOG.md
uses: stefanzweifel/git-auto-commit-action@v5.2.0
with:
branch: main
commit_author: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
commit_message: 'docs(changelog): update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md