forked from microsoft/vscode-python-debugger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d13529
commit 8baa61a
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: 'Build VSIX' | ||
description: "Build the extension's VSIX" | ||
|
||
inputs: | ||
node_version: | ||
description: 'Version of Node to install' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Install Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node_version }} | ||
cache: 'npm' | ||
|
||
# Minimum supported version is Python 3.8 | ||
- name: Use Python 3.8 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Pip cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-build-vsix-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip-build-vsix- | ||
# For faster/better builds of sdists. | ||
- name: Update pip, install pipx and install wheel | ||
run: python -m pip install -U pip pipx wheel | ||
shell: bash | ||
|
||
- name: Run npm ci | ||
run: npm ci --prefer-offline | ||
shell: bash | ||
|
||
- name: Install bundled python libraries | ||
run: pipx run nox --session install_bundled_libs | ||
shell: bash | ||
|
||
# Use the GITHUB_RUN_ID environment variable to update the build number. | ||
# GITHUB_RUN_ID is a unique number for each run within a repository. | ||
# This number does not change if you re-run the workflow run. | ||
- name: Update extension build number | ||
run: pipx run nox --session update_build_number -- $GITHUB_RUN_ID | ||
shell: bash | ||
|
||
- name: Build VSIX | ||
run: npm run vsce-package | ||
shell: bash | ||
|
||
- name: Upload VSIX | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linter-package | ||
path: | | ||
**/*.vsix | ||
if-no-files-found: error | ||
retention-days: 7 |