File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release and Publish VSIX
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ create-draft-release :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout repository
11+ uses : actions/checkout@v4
12+
13+ - name : Set up Node.js
14+ uses : actions/setup-node@v4
15+ with :
16+ node-version-file : package.json
17+
18+ - name : Get version from package.json
19+ id : get_version
20+ run : |
21+ VERSION=$(jq -r .version package.json)
22+ echo "version=$VERSION" >> $GITHUB_OUTPUT
23+
24+ - name : Install dependencies
25+ run : npm ci
26+
27+ - name : Build VSIX package
28+ run : npm run package
29+
30+ - name : Find VSIX file
31+ id : find_vsix
32+ run : |
33+ VERSION="${{ steps.get_version.outputs.version }}"
34+ VSIX_FILE="postgrestools-$VERSION.vsix"
35+ if [ !-f "$VSIX_FILE" ]; then
36+ echo "VSIX file $VSIX_FILE not found!"
37+ exit 1
38+ fi
39+ echo "vsix_file=$VSIX_FILE" >> $GITHUB_OUTPUT
40+
41+ - name : Create GitHub Release (draft)
42+ uses : softprops/action-gh-release@v2
43+ with :
44+ tag_name : " v${{ steps.get_version.outputs.version }}"
45+ name : " v${{ steps.get_version.outputs.version }}"
46+ draft : true
47+ files : " ${{ steps.find_vsix.outputs.vsix_file }}"
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 120120 "watch" : " tsc -watch -p ./" ,
121121 "pretest" : " npm run compile && npm run lint" ,
122122 "lint" : " eslint src" ,
123+ "package" : " vsce package" ,
123124 "publish" : " vsce package && vsce publish"
124125 },
125126 "devDependencies" : {
You can’t perform that action at this time.
0 commit comments