45 lines
964 B
YAML
45 lines
964 B
YAML
![]() |
version: 2.1
|
||
|
executors:
|
||
|
node-executor:
|
||
|
docker:
|
||
|
- image: cimg/node:14.15
|
||
|
jobs:
|
||
|
build:
|
||
|
executor: node-executor
|
||
|
steps:
|
||
|
- checkout
|
||
|
- run: npm install
|
||
|
- run: npm run build
|
||
|
- persist_to_workspace:
|
||
|
root: .
|
||
|
paths:
|
||
|
- .
|
||
|
publish:
|
||
|
executor: node-executor
|
||
|
steps:
|
||
|
- attach_workspace:
|
||
|
at: .
|
||
|
- run:
|
||
|
name: "Update version in package.json"
|
||
|
command: |
|
||
|
sed -i "s/\"version\": \".*\",/\"version\": \"${CIRCLE_TAG:1}\",/" package.json
|
||
|
- run:
|
||
|
name: "Publish to Marketplace"
|
||
|
command: npx vsce publish -p $VSCE_TOKEN
|
||
|
workflows:
|
||
|
version: 2
|
||
|
build-and-publish:
|
||
|
jobs:
|
||
|
- build:
|
||
|
filters:
|
||
|
branches:
|
||
|
only: main
|
||
|
- publish:
|
||
|
requires:
|
||
|
- build
|
||
|
filters:
|
||
|
tags:
|
||
|
only: /.*/
|
||
|
branches:
|
||
|
ignore: /.*/
|