-
Notifications
You must be signed in to change notification settings - Fork 19
/
action.yml
71 lines (59 loc) · 1.81 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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@v3
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@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-build-vsix-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-build-vsix-
- name: Upgrade Pip
run: python -m pip install -U pip
shell: bash
# For faster/better builds of sdists.
- name: Install build pre-requisite
run: python -m pip install wheel
shell: bash
- name: Install nox
run: python -m pip install nox
shell: bash
- name: Run npm ci
run: npm ci --prefer-offline
shell: bash
- name: Install bundled python libraries
run: python -m 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: python -m 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@v4
with:
name: formatter-package
path: |
**/*.vsix
if-no-files-found: error
retention-days: 7