Skip to content

Commit 8bb4090

Browse files
Github Action-Publish To Both VSCODE and OPENVSX
1 parent 721c323 commit 8bb4090

2 files changed

Lines changed: 18 additions & 22 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
11
name: Publish VS Code Extension on Release
22

33
on:
4-
release:
5-
types: [published]
4+
push:
5+
branches:
6+
- dev
67

78
jobs:
89
publish:
910
runs-on: ubuntu-latest
1011

1112
steps:
12-
# Step 1: Check out the repository
1313
- name: Checkout repository
1414
uses: actions/checkout@v3
15-
16-
# Step 2: Set up Node.js (required for vsce)
1715
- name: Set up Node.js
1816
uses: actions/setup-node@v3
1917
with:
20-
node-version: '18' # specify the Node.js version compatible with your project
21-
22-
# Step 3: Install dependencies
18+
node-version: '20'
2319
- name: Install dependencies
2420
run: npm install
25-
26-
# Step 4: Package and publish the extension using vsce
27-
- name: Publish Extension
28-
env:
29-
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
30-
run: |
31-
npm install -g @vscode/vsce
32-
vsce package
33-
vsce publish || exit 1 # Fail the workflow if publish fails
34-
35-
# Step 5: Update Release Notes (optional)
21+
- name: Publish to Open VSX Registry
22+
uses: HaaLeo/publish-vscode-extension@v1
23+
id: publishToOpenVSX
24+
with:
25+
pat: ${{ secrets.OPEN_VSX_TOKEN }}
26+
- name: Publish to Visual Studio Marketplace
27+
uses: HaaLeo/publish-vscode-extension@v1
28+
with:
29+
pat: ${{ secrets.VSCE_TOKEN }}
30+
registryUrl: https://marketplace.visualstudio.com
31+
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}
3632
- name: Update release to published
3733
if: success()
3834
uses: actions/github-script@v6
@@ -43,6 +39,6 @@ jobs:
4339
owner: context.repo.owner,
4440
repo: context.repo.repo,
4541
release_id: context.payload.release.id,
46-
draft: false, # Make it a published release only if the workflow succeeds
42+
draft: false, # Make it a published release only if the workflow succeeds
4743
prerelease: false
4844
});

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "vscode-java-debugx",
33
"displayName": "Java DebugX",
4-
"description": "An enhanced Java debugging experience for Visual Studio Code with advanced macro recording and playback capabilities. Supports step-in, step-out, breakpoints, and customizable debugging sessions in JSON format.",
4+
"description": "Java DebugX enhances Java debugging in Visual Studio Code by providing advanced features such as macro recording, runtime insights, and dynamic method invocation.",
55
"author": {
66
"name": "Soumya Prasad Rana",
77
"email": "soumyaprasad.rana@gmail.com"
88
},
9-
"version": "1.0.0",
9+
"version": "1.0.1",
1010
"publisher": "soumyaprasadrana",
1111
"icon": "vscode-java-debugx.png",
1212
"engines": {

0 commit comments

Comments
 (0)