chore: add .actrc #5
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: CI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
# - macos-latest | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- 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 |