chore: Apply markdownlint #43
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: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ["16", "latest"] | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
- name: Install xvfb for headless browser testing | |
run: sudo apt-get install -y xvfb | |
- name: Setup Node.js (${{ matrix.node-version }}) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- run: xvfb-run npm run test | |
package: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- run: npm ci | |
- run: npm install --global vsce | |
- run: vsce package -o ./dist | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: vsix-file | |
path: | | |
./dist/vscode-stable-sort-*.vsix | |
release: | |
if: "startsWith(github.ref, 'refs/tags/')" | |
needs: package | |
runs-on: ubuntu-latest | |
env: | |
VSCE_PAT: ${{ secrets.VSMARKETPLACE_TOKEN }} | |
OVSX_PAT: ${{ secrets.OPENVSX_TOKEN }} | |
steps: | |
- name: Make sure PATs are accessible. | |
run: echo $VSCE_PAT | wc -c; echo $OVSX_PAT | wc -c | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
- name: Download already built package files | |
uses: actions/download-artifact@v1 | |
with: | |
name: vsix-file | |
path: dist | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: npm ci | |
- name: Install vsce | |
run: npm install -g @vscode/vsce | |
- name: Publish to Visual Studio Marketplace | |
run: vsce publish --packagePath ./dist/vscode-stable-sort-*.vsix | |
timeout-minutes: 5 | |
- name: Install ovsx | |
run: npm install -g ovsx | |
- name: Publish to Open VSX Repository | |
run: ovsx publish --packagePath ./dist/vscode-stable-sort-*.vsix | |
timeout-minutes: 5 |