TextDocument ergonomics improvements #1225
Workflow file for this run
This file contains hidden or 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
| name: pygls-playground | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: .vscode/extensions/pygls-playground | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: "3.x" | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: "20.x" | |
| cache: 'npm' | |
| cache-dependency-path: '.vscode/extensions/pygls-playground/package-lock.json' | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| npm i vsce | |
| - name: Lint | |
| run: npx eslint src/*.ts | |
| - name: Compile | |
| run: npm run compile | |
| - name: Replace package.json version | |
| run: | | |
| replace_packagejson_version() { | |
| version_line=$(grep -o '"version".*' $1) | |
| version=$(python -m json.tool package.json | awk -F'"' '/version/{print $4}') | |
| build_version=$version+$2 | |
| build_version_line=${version_line/$version/$build_version} | |
| sed -i "s|$version_line|$build_version_line|g" $1 | |
| cat $1 | |
| } | |
| replace_packagejson_version package.json $GITHUB_RUN_ID | |
| - name: Build VSIX | |
| run: make dist | |
| - name: Validate VSIX | |
| run: | | |
| npx vsce ls | grep package.json | |
| npx vsce ls | grep out/extension.js | |
| - name: Upload VSIX | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: pygls-playground-vsix | |
| # The path must be rooted from the directory GitHub Actions starts | |
| # from, not the working-directory. | |
| path: .vscode/extensions/pygls-playground/*.vsix | |
| if-no-files-found: error |