chore(deps-dev): bump eslint from 9.11.1 to 9.14.0 #1225
Workflow file for this run
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
name: vscode-bitbake CI/CD | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- '*' | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
build-test-vscode: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
env: | |
DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1001/bus | |
SHELL: /usr/bin/bash | |
node-version: 20 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'npm' | |
cache-dependency-path: | | |
package-lock.json | |
server/package-lock.json | |
client/package-lock.json | |
- name: Install Node.js dependencies | |
run: npm install | |
# Inspired by https://stackoverflow.com/a/72981982 | |
- name: Configure Git autor for Yocto do_patch | |
run: | | |
git config --global user.name "${GITHUB_ACTOR}" | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Install apt dependencies | |
run: sudo apt install chrpath diffstat | |
- name: Cache fetch | |
id: cache-fetch | |
uses: actions/cache@v4 | |
with: | |
path: | | |
server/resources/docs | |
server/resources/spdx-licenses.json | |
resources/poky | |
key: cache-${{ hashFiles('scripts/fetch-poky.sh', 'scripts/fetch-docs.sh', 'scripts/fetch-spdx-licenses.sh') }} | |
- name: Fetch | |
if: steps.cache-fetch.outputs.cache-hit != 'true' | |
run: npm run fetch:poky && npm run fetch:docs && npm run fetch:spdx-licenses | |
- name: Cache build Wasm files | |
id: cache-wasm | |
uses: actions/cache@v4 | |
with: | |
path: | | |
server/tree-sitter-bash.wasm | |
server/tree-sitter-bitbake.wasm | |
key: cache-${{ hashFiles('server/tree-sitter-bash.info', 'server/tree-sitter-bitbake.info') }} | |
- name: Fetch Wasm files | |
if: steps.cache-wasm.outputs.cache-hit != 'true' | |
run: npm run fetch:wasm | |
- name: Run Linter | |
run: npm run lint | |
- name: Build Project | |
run: npm run compile | |
- name: Cache VSCode installation | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.vscode-test/vscode-* | |
.vscode-test/extensions | |
key: cache-${{ hashFiles('integration-tests/src/runTest.ts') }} | |
- name: Test Project | |
run: npm run test | |
- name: Build the VSIX | |
run: npm run package | |
- name: Archive VSIX | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vscode-bitbake | |
path: ./yocto-bitbake*.vsix | |
# Inspired by https://github.com/microsoft/vscode-platform-specific-sample/blob/a0192a21122dfa5c90934b006f027cdf4e4d892d/.github/workflows/ci.yml#L64C11-L64C11 MIT License | |
publish-vsce: | |
runs-on: ubuntu-latest | |
environment: VSCE | |
needs: build-test-vscode | |
if: success() && startsWith( github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/download-artifact@v4 | |
- run: npx vsce publish --packagePath $(find . -iname yocto-bitbake*.vsix) | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
# Instructions on https://github.com/eclipse/openvsx/wiki/Publishing-Extensions | |
publish-open-vsx: | |
runs-on: ubuntu-latest | |
environment: OPEN-VSX | |
needs: build-test-vscode | |
if: success() && startsWith( github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/download-artifact@v4 | |
- run: npx ovsx publish $(find . -iname yocto-bitbake*.vsix) -p ${VSX_PAT} | |
env: | |
VSX_PAT: ${{ secrets.VSX_PAT }} | |
build-language-server-standalone: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: 'npm' | |
cache-dependency-path: | | |
package-lock.json | |
server/package-lock.json | |
client/package-lock.json | |
- run: npm install | |
- run: npm run fetch:docs | |
- run: npm run fetch:wasm | |
- run: npm run fetch:spdx-licenses | |
- run: cd server && npm pack | |
- name: Archive server package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: language-server-bitbake | |
path: server/language-server-bitbake-*.tgz | |
# Inspired by https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages | |
publish-npm: | |
runs-on: ubuntu-latest | |
environment: NPM | |
needs: [build-test-vscode, build-language-server-standalone] | |
if: success() && startsWith( github.ref, 'refs/tags/') | |
steps: | |
# Setup .npmrc file to publish to npm | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/download-artifact@v4 | |
- name: Publish to npm | |
run: npm publish $(find . -iname language-server-bitbake-*.tgz) | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |