v1.0.2 #2
Workflow file for this run
This file contains hidden or 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/CD Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| release: | |
| types: | |
| - created | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18.x | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Run Tests (Linux) | |
| run: xvfb-run -a npm test | |
| if: runner.os == 'Linux' | |
| - name: Run Tests (Other OS) | |
| run: npm test | |
| if: runner.os != 'Linux' | |
| publish: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: success() && startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18.x | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Install vsce | |
| run: npm install @vscode/vsce --save-dev | |
| - name: Deploy Extension | |
| run: npm run deploy | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} |