Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
luooooob committed Sep 16, 2021
1 parent 198796f commit b82c4e8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 28 deletions.
31 changes: 3 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,17 @@
name: CI
name: Publish

on:
push:
branches:
- master
release:
types:
- created

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@v2
with:
node-version: 16.x
- name: Install dependencies
run: npm install
- name: Run test on linux
if: runner.os == 'Linux'
run: xvfb-run -a npm test
- name: Run test on windows, macos
if: runner.os != 'Linux'
run: npm test

publish:
name: Publish
needs: test
runs-on: windows-latest
steps:
- name: Run Publish
if: success() && startsWith(github.ref, 'refs/tags/releases/')
if: success()
run: npm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

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@v2
with:
node-version: 16.x
- name: Install dependencies
run: npm install
- name: Run test on linux
if: runner.os == 'Linux'
run: xvfb-run -a npm test
- name: Run test on windows, macos
if: runner.os != 'Linux'
run: npm test

0 comments on commit b82c4e8

Please sign in to comment.