Skip to content

Merge pull request #72 from koiverse/dependabot/npm_and_yarn/types/no… #182

Merge pull request #72 from koiverse/dependabot/npm_and_yarn/types/no…

Merge pull request #72 from koiverse/dependabot/npm_and_yarn/types/no… #182

Workflow file for this run

name: Build and Package Extension
on:
push:
branches:
- main
pull_request:
jobs:
build-and-package:
runs-on: windows-latest
steps:
# Checkout repository
- name: Checkout Repository
uses: actions/checkout@v3
# Set up Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
# Cache node_modules
- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
# Install dependencies
- name: Install Dependencies
run: yarn install
# Build the extension
- name: Build Extension
run: yarn run build
# Package the extension as a .vsix file
- name: Package Extension
run: yarn run package:vsix
# Verify the .vsix file exists
- name: Verify .vsix File
run: |
if (!(Test-Path *.vsix)) {
Write-Error "Error: No .vsix file was found!"
exit 1
}
# Upload the .vsix file as an artifact
- name: Upload VSIX Artifact
uses: actions/upload-artifact@v4
with:
name: ProCommit.vsix
path: '*.vsix'