Skip to content

Commit c814d87

Browse files
Merge branch 'main' into filipzitny/mar-253-contributing-guide-for-deepnotevscode-deepnote
2 parents 2090743 + 9e00675 commit c814d87

File tree

7 files changed

+388
-221
lines changed

7 files changed

+388
-221
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Default owners for everything in the repository
2-
* @saltenasl @jamesbhobbs @Artmann @andyjakubowski
2+
* @saltenasl @jamesbhobbs @Artmann

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,12 @@ jobs:
7878

7979
steps:
8080
- name: Checkout code
81-
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493
81+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
82+
with:
83+
fetch-depth: 0
8284

8385
- name: Install qlty
84-
uses: qltysh/qlty-action/install@a19242102d17e497f437d7466aa01b528537e899
86+
uses: qltysh/qlty-action/install@6bbb1add7432c45a3fd35a824ea69dc5bef27967
8587

8688
- name: Run qlty check
8789
run: qlty check
@@ -173,10 +175,10 @@ jobs:
173175
timeout-minutes: 15
174176
steps:
175177
- name: Checkout
176-
uses: actions/checkout@v5
178+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
177179

178180
- name: Setup Node.js
179-
uses: actions/setup-node@v5
181+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
180182
with:
181183
cache: 'npm'
182184
node-version: ${{ env.NODE_VERSION }}

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
continue-on-error: true
8080

8181
- name: Install uv
82-
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7
82+
uses: astral-sh/setup-uv@2ddd2b9cb38ad8efd50337e8ab201519a34c9f24 # v7
8383

8484
- name: Setup Venv
8585
run: |

.github/workflows/package.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: CD
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
env:
11+
NODE_VERSION: 22.x
12+
13+
permissions:
14+
contents: read
15+
packages: read
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
package:
23+
name: Build & Package Extension
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 20
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
32+
with:
33+
cache: 'npm'
34+
node-version: ${{ env.NODE_VERSION }}
35+
registry-url: 'https://npm.pkg.github.com'
36+
scope: '@deepnote'
37+
38+
- name: Install dependencies
39+
run: npm ci --prefer-offline --no-audit
40+
env:
41+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Install vsce
44+
run: npm install -g @vscode/vsce
45+
46+
- name: Extract version from package.json
47+
id: package-version
48+
run: |
49+
VERSION=$(node -p "require('./package.json').version")
50+
echo "version=$VERSION" >> $GITHUB_OUTPUT
51+
echo "Extension version: $VERSION"
52+
53+
- name: Extract and sanitize branch name
54+
id: branch-name
55+
env:
56+
UNTRUSTED_HEAD_REF: ${{ github.head_ref }}
57+
EVENT_NAME: ${{ github.event_name }}
58+
run: |
59+
# Get branch name from ref (use env vars to avoid direct interpolation)
60+
if [[ "$EVENT_NAME" == "pull_request" ]]; then
61+
BRANCH="$UNTRUSTED_HEAD_REF"
62+
else
63+
BRANCH="${GITHUB_REF#refs/heads/}"
64+
fi
65+
# Sanitize branch name for filename (replace / with -)
66+
SAFE_BRANCH=$(printf '%s' "$BRANCH" | sed 's/\//-/g')
67+
printf 'branch=%s\n' "$SAFE_BRANCH" >> "$GITHUB_OUTPUT"
68+
printf 'Branch name: %s (sanitized: %s)\n' "$BRANCH" "$SAFE_BRANCH"
69+
70+
- name: Package extension
71+
run: npm run package
72+
73+
- name: Rename VSIX file
74+
run: |
75+
# The package script creates vscode-deepnote-insiders.vsix
76+
# Rename it to include version and branch
77+
mv vscode-deepnote-insiders.vsix "vscode-deepnote-${{ steps.package-version.outputs.version }}-${{ steps.branch-name.outputs.branch }}.vsix"
78+
ls -lh *.vsix
79+
80+
- name: Upload VSIX artifact
81+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
82+
with:
83+
name: vscode-deepnote-${{ steps.package-version.outputs.version }}-${{ steps.branch-name.outputs.branch }}
84+
path: vscode-deepnote-*.vsix
85+
retention-days: 30
86+
if-no-files-found: error
87+
88+
- name: Add summary
89+
run: |
90+
echo "## 📦 Extension Packaged Successfully" >> $GITHUB_STEP_SUMMARY
91+
echo "" >> $GITHUB_STEP_SUMMARY
92+
echo "**Version:** ${{ steps.package-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
93+
echo "**Branch:** ${{ steps.branch-name.outputs.branch }}" >> $GITHUB_STEP_SUMMARY
94+
echo "" >> $GITHUB_STEP_SUMMARY
95+
echo "### Installation Instructions" >> $GITHUB_STEP_SUMMARY
96+
echo "1. Download the artifact from the Actions tab" >> $GITHUB_STEP_SUMMARY
97+
echo "2. Extract the .vsix file from the zip" >> $GITHUB_STEP_SUMMARY
98+
echo "3. Install in VS Code:" >> $GITHUB_STEP_SUMMARY
99+
echo " - Open VS Code" >> $GITHUB_STEP_SUMMARY
100+
echo " - Go to Extensions view (Ctrl+Shift+X / Cmd+Shift+X)" >> $GITHUB_STEP_SUMMARY
101+
echo " - Click the '...' menu → 'Install from VSIX...'" >> $GITHUB_STEP_SUMMARY
102+
echo " - Select the downloaded .vsix file" >> $GITHUB_STEP_SUMMARY
103+
echo "" >> $GITHUB_STEP_SUMMARY
104+
echo "Alternatively, use the command line:" >> $GITHUB_STEP_SUMMARY
105+
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
106+
echo "code --install-extension vscode-deepnote-${{ steps.package-version.outputs.version }}-${{ steps.branch-name.outputs.branch }}.vsix" >> $GITHUB_STEP_SUMMARY
107+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

icon.png

1.17 KB
Loading

0 commit comments

Comments
 (0)