-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (52 loc) · 1.77 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: "publish"
on:
push:
branches:
- master
jobs:
cd:
runs-on: ubuntu-latest
steps:
- name: Checkout to branch
uses: actions/checkout@v2
- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Setup node.js
uses: actions/setup-node@v1
with:
node-version: 18
- name: Install packages
run: npm ci
- name: Install vsce
run: npm i -g @vscode/vsce
- name: Bump version
run: npm version patch
- name: Calculate version
id: calculateVersion
run: |
APP_VERSION=`cat package.json | jq ".version" -M | sed 's/\"//g'`
echo "AppVersion=$APP_VERSION" >> $GITHUB_OUTPUT
echo "app version = v$APP_VERSION"
- name: Build VSIX package
run: npm run build -- -o vscode-starlims.v${{ steps.calculateVersion.outputs.AppVersion }}.vsix
- uses: lannonbr/vsce-action@3.0.0
name: Publish extension package
with:
args: "publish -p $VSCODE_MARKETPLACE_TOKEN"
env:
VSCODE_MARKETPLACE_TOKEN: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}
- uses: rickstaa/action-create-tag@v1
name: Create tag
with:
tag: v${{ steps.calculateVersion.outputs.AppVersion }}
tag_exists_error: false
message: "Latest release"
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: v${{ steps.calculateVersion.outputs.AppVersion }}
name: v${{ steps.calculateVersion.outputs.AppVersion }}
artifacts: "vscode-starlims.v${{ steps.calculateVersion.outputs.AppVersion }}.vsix,src/backend/SCM_API.sdp"
makeLatest: true