Skip to content

Commit a11fa6b

Browse files
stormslowlyCopilot
andauthored
chore: add releasing open VSX (#234)
Co-authored-by: Copilot <[email protected]>
1 parent a39e56a commit a11fa6b

File tree

3 files changed

+46
-21
lines changed

3 files changed

+46
-21
lines changed

.github/actions/setup-node/action.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Setup Node
2+
description: Setup Node.js Environment
3+
4+
runs:
5+
using: composite
6+
7+
steps:
8+
- name: Setup Node.js
9+
uses: actions/setup-node@v4
10+
with:
11+
node-version: '24'
12+
13+
- name: Install pnpm
14+
shell: bash
15+
run: corepack enable
16+
17+
- name: Install dependencies
18+
shell: bash
19+
run: pnpm install --frozen-lockfile

.github/workflows/ci.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,14 @@ jobs:
6363
with:
6464
submodules: true
6565

66-
- name: Setup Node
67-
uses: actions/setup-node@v4
68-
with:
69-
node-version: '24'
7066
- name: Setup Go
7167
uses: ./.github/actions/setup-go
7268
with:
7369
go-version: ${{ matrix.go-version }}
7470
cache-name: test-node
75-
- name: Install pnpm
76-
run: corepack enable
7771

78-
- name: Install dependencies
79-
run: pnpm install --frozen-lockfile
72+
- name: Setup Node.js
73+
uses: ./.github/actions/setup-node
8074

8175
- name: Format
8276
run: pnpm format:check

.github/workflows/release.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ jobs:
103103
run: |
104104
pnpm -r publish --no-git-checks --tag ${{ github.event.inputs.npm_tag }} --publish-branch ${{ github.event.inputs.branch }}
105105
106-
publish-extesion:
106+
publish-extension-vscode:
107107
if: ${{ inputs.to_release == 'all' || inputs.to_release == 'extension' }}
108-
name: ${{ inputs.dry_run == true && 'Dry Run - Extensions' || 'Publish Extensions' }}
108+
name: ${{ inputs.dry_run == true && 'Dry Run - VSCode Extensions' || 'Publish VSCode Extensions' }}
109109
needs: [build]
110110
runs-on: rspack-ubuntu-22.04-large
111111
steps:
@@ -117,15 +117,7 @@ jobs:
117117
submodules: true
118118

119119
- name: Setup Node.js
120-
uses: actions/setup-node@v4
121-
with:
122-
node-version: '24'
123-
124-
- name: Install pnpm
125-
run: corepack enable
126-
127-
- name: Install dependencies
128-
run: pnpm install --frozen-lockfile
120+
uses: ./.github/actions/setup-node
129121

130122
- name: Download Artifact
131123
uses: actions/[email protected]
@@ -154,9 +146,29 @@ jobs:
154146
uses: actions/upload-artifact@v4
155147
with:
156148
path: packages/vscode-extension/rslint-*.vsix
149+
150+
publish-extension-open-vsx:
151+
if: ${{ inputs.to_release == 'all' || inputs.to_release == 'extension' }}
152+
name: ${{ inputs.dry_run == true && 'Dry Run - Open VSX Extensions' || 'Publish Open VSX Extensions' }}
153+
needs: [build]
154+
runs-on: ubuntu-22.04
155+
steps:
156+
- name: Checkout
157+
uses: actions/checkout@v4
158+
with:
159+
fetch-depth: 1
160+
ref: ${{ github.event.inputs.branch }}
161+
submodules: true
162+
163+
- name: Setup Node
164+
uses: ./.github/actions/setup-node
165+
166+
- name: Download Artifact
167+
uses: actions/[email protected]
168+
with:
169+
path: binaries
170+
157171
- name: Build and publish to Open VSX Registry
158-
# TODO fix the timeout problem while publish to Open VSX Registry
159-
if: false
160172
env:
161173
OVSX_PAT: ${{ secrets.RSLINT_OVSX_PAT }}
162174
run: |

0 commit comments

Comments
 (0)