Skip to content

Commit ee9f2e4

Browse files
committed
chore: create auto-version.yml and delete bump-version-comment.yml
1 parent 638504f commit ee9f2e4

File tree

2 files changed

+50
-76
lines changed

2 files changed

+50
-76
lines changed

.github/workflows/auto-version.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Auto Version Bump
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
bump-version:
9+
if: startsWith(github.event.pull_request.title, 'v')
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.event.pull_request.head.ref }}
19+
20+
- uses: pnpm/action-setup@v4
21+
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 24
25+
26+
- name: Install Lerna Lite
27+
run: pnpm add -g @lerna-lite/cli @lerna-lite/version
28+
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Bump version from PR title
33+
run: |
34+
VERSION="${{ github.event.pull_request.title }}"
35+
if [[ "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
36+
lerna version "$VERSION" --yes --no-push --no-git-tag-version --force-publish
37+
else
38+
echo "PR title is not a valid version."
39+
exit 1
40+
fi
41+
42+
- name: Generate extension metadata
43+
working-directory: extensions/vscode
44+
run: npm run gen-ext-meta
45+
46+
- name: Commit
47+
uses: EndBug/add-and-commit@v9
48+
with:
49+
message: "ci: bump version [skip ci]"
50+
default_author: github_actions

.github/workflows/bump-version-comment.yml

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

0 commit comments

Comments
 (0)