Repository navigation
Upgrade upload-artifact action to version 7 #227
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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| release: | |
| types: | |
| - created | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Run Lint | |
| run: npm run lint | |
| - name: Run Tests (macOS & Windows) | |
| run: npm run test | |
| if: runner.os != 'Linux' | |
| - name: Run Tests (Linux) | |
| run: xvfb-run -a npm run test | |
| if: runner.os == 'Linux' | |
| - name: Build Production | |
| run: npm run build:production | |
| if: runner.os == 'Linux' | |
| - name: Prune for Release | |
| run: npm prune --production | |
| if: runner.os == 'Linux' | |
| - name: Package VSIX | |
| run: npm run package | |
| if: runner.os == 'Linux' | |
| - name: Upload Artifact | |
| if: runner.os == 'Linux' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-vscode | |
| path: release.vsix | |
| - name: Publish Artifact | |
| if: success() && startsWith( github.ref, 'refs/tags/v') && matrix.os == 'ubuntu-latest' | |
| run: npm run deploy | |
| env: | |
| VSCE_PAT: ${{secrets.VSCE_PAT}} |