Fix error underlining and popup problems (#153) #512
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
# Adapted from https://github.com/HaaLeo/vscode-timing/.github/workflows/cicd.yml | |
name: CI | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
release: | |
types: | |
- published | |
concurrency: | |
group: '${{ github.workflow }}-${{ github.head_ref || github.run_id }}' | |
cancel-in-progress: true | |
env: | |
SKIP: make-all | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- uses: pre-commit/[email protected] | |
build-test-lint: | |
name: Node ${{ matrix.node }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
needs: setup-xvfb | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: true | |
matrix: | |
os: | |
- ubuntu-latest | |
- macos-latest | |
node: | |
- 22.2.0 | |
outputs: | |
vsixPath: ${{ steps.packageExtension.outputs.vsixPath }} | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- name: Install Node ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Linter | |
run: npm run lint | |
- name: Build Code | |
run: npm run compile | |
- name: Package Extension | |
id: packageExtension | |
uses: HaaLeo/publish-vscode-extension@v1 | |
with: | |
pat: stub | |
dryRun: true | |
- name: Upload Extension Package as Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }} | |
path: ${{ steps.packageExtension.outputs.vsixPath }} | |
overwrite: true | |
setup-xvfb: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Xvfb | |
run: | | |
sudo apt-get update | |
sudo apt-get install xvfb | |
- name: Start Xvfb | |
run: Xvfb :99 -screen 0 1280x1024x24 & | |
publish: | |
name: Publish Github Action | |
needs: | |
- build-test-lint | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
- name: Install Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.2.0 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Download Build Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ubuntu-latest | |
- name: GitHub Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: false | |
name: ${{ github.ref_name }} | |
fail_on_unmatched_files: true | |
files: | | |
${{ needs.build-lint.outputs.vsixPath }} | |
LICENSE | |
README.md | |
- name: Publish to Visual Studio Marketplace | |
uses: HaaLeo/publish-vscode-extension@v1 | |
with: | |
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }} | |
extensionFile: ${{ needs.build-lint.outputs.vsixPath }} | |
registryUrl: https://marketplace.visualstudio.com | |
- name: Publish to Open VSX Registry | |
uses: HaaLeo/publish-vscode-extension@v1 | |
with: | |
pat: ${{ secrets.OPEN_VSX_TOKEN }} | |
extensionFile: ${{ needs.build-lint.outputs.vsixPath }} |