generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (38 loc) · 1.27 KB
/
release-vsc.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
41
42
43
44
name: Release VSC Plugin
on:
push:
branches: [main]
paths:
- code4me-vsc-plugin/**
env:
WORKING_DIRECTORY: code4me-vsc-plugin
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check Commit Message
id: check-commit
run: |
if [[ "${{ github.event.head_commit.message }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(\-[a-zA-Z]+)?$ ]]; then
echo ::set-output name=isSemver::true
fi
- uses: actions/checkout@v3
if: steps.check-commit.outputs.isSemver == 'true'
- uses: actions/setup-node@v3
if: steps.check-commit.outputs.isSemver == 'true'
with:
node-version: 16
cache: 'npm'
cache-dependency-path: code4me-vsc-plugin/package-lock.json
- name: Install the dependencies
if: steps.check-commit.outputs.isSemver == 'true'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: npm i
- name: Install vsce
if: steps.check-commit.outputs.isSemver == 'true'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: npm i -g vsce
- name: Publish
if: steps.check-commit.outputs.isSemver == 'true'
working-directory: ${{ env.WORKING_DIRECTORY }}
run: vsce publish -p ${{ secrets.VSCE_PAT }}