feat: Automate version bumping with bumpp and create GitHub releases in CI

This commit is contained in:
JOYCEQL
2026-02-14 12:39:48 +08:00
parent 4630b82291
commit 9dadb44598
2 changed files with 18 additions and 3 deletions
+17 -3
View File
@@ -21,13 +21,27 @@ jobs:
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Git Configuration
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump version
run: 'npm version patch -m "chore(release): %s [skip ci]"'
run: npx bumpp patch --no-progress --commit "chore(release): v%s [skip ci]" --tag --push --yes
- name: Push changes
run: git push --follow-tags
- name: Get new version
id: version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.version.outputs.version }}
name: Release v${{ steps.version.outputs.version }}
generate_release_notes: true
+1
View File
@@ -77,6 +77,7 @@
"zustand": "^4.5.4"
},
"devDependencies": {
"bumpp": "^9.10.1",
"@cloudflare/next-on-pages": "^1.13.12",
"@types/lodash": "^4.17.13",
"@types/node": "^20",