Skip to content

Commit 2d9435e

Browse files
committed
Enhance GitHub Actions workflow for packaging and uploading VSIX; update package.json to include repository information
1 parent 08d83db commit 2d9435e

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

.github/workflows/publish.yaml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,31 @@ jobs:
3131
uses: actions/setup-node@v4
3232

3333
# install dependencies and build package
34-
- name: compile Scala and build js to out/
35-
run: sbt buildDebug
34+
- name: compile Scala and build js to out/ folder
35+
run:
36+
sbt buildDebug
37+
38+
- name: package extension inside out/ folder
39+
run:
40+
cd out/
41+
ls -la
42+
npx vsce package
43+
44+
- name: Get upload url
45+
id: get_upload_url
46+
run: |
47+
URL=$(curl --silent "https://api.github.com/repos/doofin/functorcoder/releases/latest" | jq -r '.upload_url')
48+
echo ::set-output name=UPLOAD_URL::$URL
49+
50+
- name: Upload VSIX package to github release
51+
uses: actions/[email protected]
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
with:
55+
upload_url: ${{ steps.get_upload_url.outputs.UPLOAD_URL }}
56+
asset_path:
57+
./out/functorcoder-0.0.1.vsix
58+
asset_name: |
59+
functorcoder-0.0.1.vsix
60+
asset_content_type: application/octet-stream
3661

37-
- name: package extension
38-
run: cd out/ && npx vsce package

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
"name": "functorcoder",
33
"displayName": "functorcoder",
44
"description": "an ai coding assistant",
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/doofin/functorcoder/"
8+
},
59
"version": "0.0.1",
610
"publisher": "functorcoder.com",
711
"categories": [
@@ -10,7 +14,7 @@
1014
"activationEvents": [
1115
"*"
1216
],
13-
"main": "./out/extension",
17+
"main": "./extension",
1418
"engines": {
1519
"vscode": "^1.84.0"
1620
},

0 commit comments

Comments
 (0)