forked from saadeghi/daisyui
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.67 KB
/
write-release-notes.yml
File metadata and controls
58 lines (49 loc) · 1.67 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: "📝 write release notes"
on:
workflow_call:
jobs:
write-release-notes:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 10
clean: false
ref: master
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun i
- name: Build package
run: bun run --bun build
- name: Read package version from package.json
id: package-version
run: |
version=$(grep -o '"version": *"[^"]*"' packages/daisyui/package.json | cut -d'"' -f4)
echo version=$version >> $GITHUB_OUTPUT
if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "$version is a stable version"
echo "is-stable=true" >> $GITHUB_OUTPUT
else
echo "$version is not a stable version"
echo "is-stable=false" >> $GITHUB_OUTPUT
fi
- name: Add release notes to GitHub
uses: softprops/action-gh-release@v2
if: steps.package-version.outputs.is-stable == 'true'
with:
tag_name: v${{ steps.package-version.outputs.version }}
body: |
🌼 Read changelog: https://daisyui.com/docs/changelog/
📦 Install this update:
```bash
npm i -D daisyui@${{ steps.package-version.outputs.version }}
```
💚 Thank you for using daisyUI!
files: |
packages/bundle/daisyui.js
packages/bundle/daisyui.mjs
packages/bundle/daisyui-theme.js
packages/bundle/daisyui-theme.mjs