Skip to content

Commit 2fdd93e

Browse files
authored
Merge pull request #4 from code4me-me/feature/vsc-pipeline
Add VSC pipeline
2 parents 442d28f + 01d1342 commit 2fdd93e

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed
File renamed without changes.

.github/workflows/release-vsc.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release VSC Plugin
2+
on:
3+
push:
4+
branches: [main]
5+
paths:
6+
- code4me-vsc-plugin/**
7+
8+
env:
9+
WORKING_DIRECTORY: code4me-vsc-plugin
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Check Commit Message
17+
id: check-commit
18+
run: |
19+
if [[ ${{ github.event.head_commit.message }} =~ ^v[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]+)?$ ]]; then
20+
echo ::set-output name=isSemver::true
21+
fi
22+
- uses: actions/checkout@v3
23+
if: steps.check-tag.outputs.isSemver == 'true'
24+
- uses: actions/setup-node@v3
25+
if: steps.check-tag.outputs.isSemver == 'true'
26+
with:
27+
node-version: 16
28+
cache: 'npm'
29+
cache-dependency-path: code4me-vsc-plugin/package-lock.json
30+
31+
- name: Install the dependencies
32+
if: steps.check-tag.outputs.isSemver == 'true'
33+
working-directory: ${{ env.WORKING_DIRECTORY }}
34+
run: npm i
35+
36+
- name: Install vsce
37+
if: steps.check-tag.outputs.isSemver == 'true'
38+
working-directory: ${{ env.WORKING_DIRECTORY }}
39+
run: npm i -g vsce
40+
41+
- name: Publish
42+
if: steps.check-tag.outputs.isSemver == 'true'
43+
working-directory: ${{ env.WORKING_DIRECTORY }}
44+
run: vsce publish -p ${{ secrets.VSCE_PAT }}

0 commit comments

Comments
 (0)