Skip to content

Commit eb9cdaf

Browse files
chore: update release flow so branches can be named whatever
1 parent 218eded commit eb9cdaf

File tree

6 files changed

+42
-48
lines changed

6 files changed

+42
-48
lines changed

.github/pr-labeler.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/release-drafter.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lint pull request title
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize, reopened]
6+
7+
jobs:
8+
lint-pr-title:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Setup Bun
17+
uses: oven-sh/setup-bun@v2
18+
19+
- name: Install dependencies
20+
run: |
21+
bun install @commitlint/config-conventional @commitlint/cli
22+
23+
- name: Lint title
24+
env:
25+
PR_TITLE: ${{ github.event.pull_request.title }}
26+
run: |
27+
echo "$PR_TITLE" | bunx commitlint

.github/workflows/pr-labeler.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
1416
- uses: php-actions/composer@v6
1517
with:
1618
php_extensions: zip
@@ -24,12 +26,24 @@ jobs:
2426
- name: Create zip
2527
run: cd resources && tar -czvf dist.tar.gz dist
2628

29+
- name: Generate release notes
30+
uses: orhun/git-cliff-action@v4
31+
id: generate_release_notes
32+
with:
33+
args: -v --latest --strip header
34+
35+
- name: Clean up release notes
36+
run: |
37+
cat ${{ steps.generate_release_notes.outputs.changelog }}
38+
cat ${{ steps.generate_release_notes.outputs.changelog }} | sed '1,2d' > release_notes.txt
39+
2740
- name: Create release
2841
id: create_release
2942
uses: actions/create-release@v1
3043
env:
3144
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3245
with:
46+
body_path: release_notes.txt
3347
tag_name: ${{ github.ref }}
3448
release_name: ${{ github.ref }}
3549

0 commit comments

Comments
 (0)