Skip to content

Implement syntax checking features #696

Implement syntax checking features

Implement syntax checking features #696

Workflow file for this run

name: NodeJS with Webpack
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Build and package
run: |
npm install
npx webpack
npm install -g vsce
vsce package
- name: get .vsix name
run: |
echo "vsix_name=$(echo *.vsix)" >> $GITHUB_ENV
cat $GITHUB_ENV
- name: Upload dist artifacts
uses: actions/upload-artifact@v3
with:
name: test_vsix
path: ${{env.vsix_name}}
- name: Find Comment
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: new build is available
- name: Post comment
if: steps.fc.outputs.comment-id == ''
uses: actions/github-script@v5
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '👋 A new build is available for this PR based on ${{ github.event.pull_request.head.sha }}.\n * [Download here.](https://github.com/codefori/vscode-db2i/actions/runs/${{ github.run_id }})\n* [Read more about how to test](https://github.com/codefori/vscode-db2i/blob/master/.github/pr_testing_template.md)'
})
- name: Update comment
if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v1
with:
edit-mode: replace
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
👋 A new build is available for this PR based on ${{ github.event.pull_request.head.sha }}.
* [Download here.](https://github.com/codefori/vscode-db2i/actions/runs/${{ github.run_id }})
* [Read more about how to test](https://github.com/codefori/vscode-db2i/blob/master/.github/pr_testing_template.md)