Skip to content

Commit 6c2aa74

Browse files
author
sunzhongyi
committed
chore: update action
1 parent 82817d1 commit 6c2aa74

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88
inputs:
99
version:
10-
description: 'Version to publish (e.g., v1.0.0)'
10+
description: 'Version to publish (e.g., 1.0.0, leave empty to use package.json version)'
1111
required: false
1212
default: ''
1313

@@ -30,9 +30,15 @@ jobs:
3030
- name: Install dependencies
3131
run: npm ci
3232

33+
- name: Update version if specified
34+
if: github.event.inputs.version != ''
35+
run: |
36+
echo "Updating version to ${{ github.event.inputs.version }}"
37+
npm version ${{ github.event.inputs.version }} --no-git-tag-version
38+
3339
- name: Build project
3440
run: npm run build
35-
41+
3642
- name: Install VSCE
3743
run: npm install -g @vscode/vsce
3844

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "commit-assistant",
33
"displayName": "Commit Assistant",
44
"description": "Smart commit message editor that helps you write better commit messages",
5-
"version": "0.1.1",
5+
"version": "0.1.2",
66
"publisher": "sunzhongyi",
77
"license": "MIT",
88
"engines": {

0 commit comments

Comments
 (0)