-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (41 loc) · 1.05 KB
/
publish.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
name: publish extensions
on:
release:
types: [created]
jobs:
branch-check:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: compare git commit id
run: |
git checkout main
if [ $GITHUB_SHA == $(git log -n 1 --pretty=format:"%H") ]
then
echo "release tag's HEAD equals main branch"
else
echo "release tag's HEAD NOT equals main branch (publish only main branch)"
exit 1
fi
git checkout -
test:
runs-on: ubuntu-latest
needs:
- branch-check
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
npm install -g @vscode/vsce
npm install
- name: format check
run: npm run fmt:check
- name: Publish extension
id: publisher
uses: sigma/[email protected]
with:
vsce_token: ${{ secrets.VSCE_TOKEN }}
build_pkg: yes