Skip to content

Commit 8d9e140

Browse files
committed
🤖 refactor: add reusable build-vscode-extension action
Create composite action for building VS Code extension to avoid duplication between build and release workflows. Changes: - Created .github/actions/build-vscode-extension/action.yml - Updated release.yml to use the composite action - Added build-vscode-extension job to build.yml (CI workflow) - Extension now builds on every PR and uploads as artifact This ensures the extension builds are tested in CI and available as artifacts for every PR. _Generated with `cmux`_
1 parent 0ae4365 commit 8d9e140

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: "Build VS Code Extension"
2+
description: "Build the cmux VS Code extension"
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Build VS Code extension
8+
shell: bash
9+
run: make vscode-ext

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,24 @@ jobs:
8989
path: release/*.AppImage
9090
retention-days: 30
9191
if-no-files-found: error
92+
93+
build-vscode-extension:
94+
name: Build VS Code Extension
95+
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16' || 'ubuntu-latest' }}
96+
steps:
97+
- name: Checkout code
98+
uses: actions/checkout@v4
99+
with:
100+
fetch-depth: 0 # Required for git describe to find tags
101+
102+
- uses: ./.github/actions/setup-cmux
103+
104+
- uses: ./.github/actions/build-vscode-extension
105+
106+
- name: Upload VS Code extension artifact
107+
uses: actions/upload-artifact@v4
108+
with:
109+
name: vscode-extension
110+
path: vscode/cmux-*.vsix
111+
retention-days: 30
112+
if-no-files-found: error

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ jobs:
7070

7171
- uses: ./.github/actions/setup-cmux
7272

73-
- name: Build VS Code extension
74-
run: make vscode-ext
73+
- uses: ./.github/actions/build-vscode-extension
7574

7675
- name: Upload VS Code extension to release
7776
env:

0 commit comments

Comments
 (0)