-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (55 loc) · 1.73 KB
/
release.yml
File metadata and controls
66 lines (55 loc) · 1.73 KB
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
65
66
name: Release VSCode Extension
on:
push:
tags:
- 'v*.*.*' # 仅在推送符合 semver 格式的标签时触发
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- name: Cache pnpm store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: pnpm-store-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-${{ runner.os }}-
- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
node-modules-${{ runner.os }}-
- name: Install dependencies
run: |
pnpm install
- name: Publish Extension to VSCode Marketplace
run: npx vsce publish -p ${{ secrets.VSCE_TOKEN }} --no-dependencies
- name: Publish Extension to OVSX
run: npx ovsx publish -p ${{ secrets.OVSX_TOKEN }} --no-dependencies
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false