Skip to content

Commit 804d26d

Browse files
committed
Try setting up a release pipeline
1 parent 996fe7e commit 804d26d

3 files changed

Lines changed: 59 additions & 1 deletion

File tree

.github/workflows/build-vsix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Set up Node.js
1414
uses: actions/setup-node@v4
1515
with:
16-
node-version: '20' # Use a relevant Node.js version
16+
node-version: '22' # Use a relevant Node.js version
1717
cache: 'npm'
1818

1919
- name: Install dependencies

.github/workflows/release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release with Artifacts
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Triggers on tag pushes that start with 'v', e.g., v1.0.0
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '22' # Use a relevant Node.js version
19+
cache: 'npm'
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Package extension
25+
run: npx vsce package
26+
27+
- name: Upload workflow artifacts
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: release-assets
31+
path: '*.vsix'
32+
33+
release:
34+
needs: build # Ensures this job runs after the build job is successful
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: write # Grant write permission for creating the release and uploading assets
38+
steps:
39+
- name: Checkout code
40+
uses: actions/checkout@v4
41+
42+
- name: Download workflow artifacts
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: release-assets
46+
path: my_app/build/ # Download artifacts to this path
47+
48+
- name: Create or Update Release and Upload Assets
49+
uses: softprops/action-gh-release@v2
50+
with:
51+
files: |
52+
my_app/build/release-assets
53+
draft: false # Set to true to create a draft release
54+
prerelease: false # Set to true for a pre-release
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ This extension makes use of two [VSCode API proposals](https://code.visualstudio
1414
}
1515
```
1616

17+
> **NOTE:** This also means that I cannot upload the extension to the Microsoft Extension Registry as they do not allow extensions that use API proposals.
18+
1719
## How does this work?
1820

1921
This extension will download the vscode-server resources to `$HOME/.vscode-server-flatpak`, and invoke it with `flatpak-spawn --host`. The server will expose itself over `LOCALHOST`, and the VSCode Flatpak will connect to `LOCALHOST`.

0 commit comments

Comments
 (0)