-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (37 loc) · 983 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
on:
push:
tags: ["v*"]
branches: ["main"]
pull_request:
name: Build and deploy
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build & test
run: yarn ci
- name: Run Integration tests
uses: GabrielBB/[email protected]
with:
run: yarn test:it
deploy:
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
needs: build
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Install vsce and deps
run: |
yarn global add vsce
yarn install
- name: Publish
run: |
echo $RELEASE_VERSION
vsce publish -p $VSCODE_TOKEN --no-git-tag-version ${RELEASE_VERSION:1}
env:
VSCODE_TOKEN: ${{ secrets.VSCODE_TOKEN }}