-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (64 loc) · 2.15 KB
/
version.yml
File metadata and controls
81 lines (64 loc) · 2.15 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Version
on:
workflow_dispatch:
jobs:
version:
name: Create Release PR
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.15.1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Get Release Branch Name
id: branch
run: |
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
echo "name=release/${TIMESTAMP}" >> $GITHUB_OUTPUT
- name: Create Release Branch
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b ${{ steps.branch.outputs.name }}
- name: Version Packages
run: pnpm changeset version
- name: Commit Version Changes
run: |
git add .
git commit -m "chore: version packages" || echo "No changes to commit"
- name: Push Release Branch
run: git push origin ${{ steps.branch.outputs.name }}
- name: Create Release PR
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run: |
gh pr create \
--title "chore: release packages" \
--body "This PR was automatically created by the Version workflow.
## Changes
This release includes the following package updates:
- Check the CHANGELOG.md files in each package for details
- Review the version bumps in package.json files
## Checklist
- [ ] Review all version bumps
- [ ] Review all CHANGELOG.md updates
- [ ] Verify build passes
- [ ] Verify tests pass
Once approved and merged, packages will be automatically published to npm." \
--base main \
--head ${{ steps.branch.outputs.name }}