-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (40 loc) · 1.2 KB
/
release.yml
File metadata and controls
50 lines (40 loc) · 1.2 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
name: Automated Release
on:
push:
branches:
- main
workflow_dispatch: # Allow manual triggering
permissions:
contents: write
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
# Only run if the commit is not a release commit (to avoid loops)
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for changelog generation
token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.9
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Run standard-version
run: |
pnpm run release
- name: Push changes and tags
run: |
git push --follow-tags origin main