Skip to content

Merge pull request #4 from axelrindle/dependabot/npm_and_yarn/typescr… #15

Merge pull request #4 from axelrindle/dependabot/npm_and_yarn/typescr…

Merge pull request #4 from axelrindle/dependabot/npm_and_yarn/typescr… #15

Workflow file for this run

name: CI
on:
push:
branches:
- main
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
# - macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Set git to use LF
if: runner.os == 'Windows'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18.15.x
cache: 'npm'
- run: npm ci
- name: Restore .vscode-test
uses: actions/cache/restore@v4
with:
path: .vscode-test
key: ${{ runner.os }}-test
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
- name: Restore .vscode-test
uses: actions/cache/save@v4
with:
path: .vscode-test
key: ${{ runner.os }}-test
- name: Set nightly version
run: |
timestamp=$(date +%Y%m%d%H%M%S)
version=$(npm pkg get version | sed 's/\"//g')
npm pkg set version="$version-next+$timestamp"
if: runner.os == 'Linux'
- name: Create VSIX package
run: npm run package -- --pre-release
if: runner.os == 'Linux'
- name: Upload VSIX package artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: vsix
path: '*.vsix'
retention-days: 1