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
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| name: Test | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run headless test | |
| uses: GabrielBB/[email protected] | |
| with: | |
| run: npm test | |
| publish: | |
| name: Release and publish | |
| needs: test | |
| runs-on: ubuntu-18.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: npx semantic-release | |
| - name: Vscode release plugin | |
| uses: JCofman/vscodeaction@master | |
| env: | |
| PUBLISHER_TOKEN: ${{ secrets.PUBLISHER_TOKEN }} | |
| with: | |
| args: publish -p $PUBLISHER_TOKEN |