Skip to content

Commit 7a28c65

Browse files
author
Nick Seagull
authored
Merge pull request #1 from boostercloud/packaging
Automatic packaging
2 parents 3b509ff + caf83c6 commit 7a28c65

File tree

4 files changed

+84
-7
lines changed

4 files changed

+84
-7
lines changed

.github/workflows/ci.yml

+74-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,31 @@ jobs:
1313
with:
1414
node-version: 18
1515

16+
- uses: pnpm/action-setup@v3
17+
name: Install pnpm
18+
with:
19+
version: 8
20+
run_install: false
21+
22+
- name: Get pnpm store directory
23+
shell: bash
24+
run: |
25+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
26+
27+
- uses: actions/cache@v3
28+
name: Setup pnpm cache
29+
with:
30+
path: ${{ env.STORE_PATH }}
31+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
32+
restore-keys: |
33+
${{ runner.os }}-pnpm-store-
34+
1635
- name: Install dependencies
17-
run: npm ci
36+
run: pnpm install
1837

19-
- name: Build
20-
run: npm run compile
38+
- name: Compile
39+
run: pnpm compile
40+
working-directory: apps/extension
2141

2242
release:
2343
runs-on: ubuntu-latest
@@ -27,9 +47,58 @@ jobs:
2747
with:
2848
node-version: 18
2949

50+
- uses: pnpm/action-setup@v3
51+
name: Install pnpm
52+
with:
53+
version: 8
54+
run_install: false
55+
56+
- name: Get pnpm store directory
57+
shell: bash
58+
run: |
59+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
60+
61+
- uses: actions/cache@v3
62+
name: Setup pnpm cache
63+
with:
64+
path: ${{ env.STORE_PATH }}
65+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
66+
restore-keys: |
67+
${{ runner.os }}-pnpm-store-
68+
3069
- name: Install dependencies
31-
run: npm ci
70+
run: |
71+
pnpm install
72+
pnpm i -g @vscode/vsce
3273
33-
- run: npx semantic-release
74+
- name: Compile
75+
run: pnpm compile
76+
working-directory: apps/extension
77+
- uses: actions/checkout@v3
78+
- uses: actions/setup-node@v3
79+
with:
80+
node-version: 18
81+
82+
- name: Generate VSIX
83+
run: pnpm vsce package --no-dependencies
84+
working-directory: apps/extension
85+
86+
- name: Create Release
87+
id: create_release
88+
uses: actions/create-release@v1
89+
env:
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
91+
with:
92+
tag_name: ${{ github.ref }}-prelease
93+
release_name: Release ${{ github.ref }} (prelease)
94+
draft: false
95+
prerelease: true
96+
- uses: xresloader/upload-to-github-release@main
3497
env:
3598
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99+
with:
100+
file: "*.vsix"
101+
delete_file: "*.vsix"
102+
release_id: ${{ steps.create_release.outputs.id }}
103+
overwrite: true
104+
verbose: true

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ yarn-error.log*
3636
# Misc
3737
.DS_Store
3838
*.pem
39+
40+
41+
*.vsix

LICENSE.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ALL RIGHTS RESERVED - The Agile Monkeys S.L

apps/extension/package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
"description": "Booster Tutor",
66
"version": "0.0.1",
77
"engines": {
8-
"vscode": "^1.74.0"
8+
"vscode": "^1.77.0"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/boostercloud/booster-tutor"
913
},
1014
"categories": [
1115
"Other"
@@ -50,7 +54,7 @@
5054
"watch": "concurrently \"pnpm run watch:extension\" \"pnpm run watch:webview\"",
5155
"watch:extension": "pnpm run compile:extension --watch",
5256
"watch:webview": "pnpm run compile:webview --watch",
53-
"package": "webpack --mode production --devtool hidden-source-map",
57+
"package": "concurrently \"pnpm run compile:extension --mode production --devtool hidden-source-map\" \"pnpm run compile:webview --mode production --devtool hidden-source-map\"",
5458
"compile-tests": "tsc -p . --outDir out",
5559
"watch-tests": "tsc -p . -w --outDir out",
5660
"pretest": "pnpm run compile-tests && pnpm run compile && pnpm run lint",

0 commit comments

Comments
 (0)