-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (61 loc) · 2.14 KB
/
build.yml
File metadata and controls
77 lines (61 loc) · 2.14 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
67
68
69
70
71
72
73
74
75
76
77
name: Build and Release Extension
on:
push:
tags:
- 'v*.*.*' # Match version tags, like v1.0.0
permissions:
contents: write
packages: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-js-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Compile TypeScript
run: npm run compile
- name: Install vsce
run: npm install -g vsce
- name: Package extension
run: vsce package
- name: Get version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ steps.get_version.outputs.VERSION }}
body: |
## Trae Usage Monitor v${{ steps.get_version.outputs.VERSION }}
### Features
- Real-time Trae AI usage monitoring
- Token usage statistics
- Visual usage dashboard in VSCode
- Configurable refresh intervals
### Installation
1. Install the `.vsix` file or search "Trae Usage Monitor" in Extensions Store
2. Configure your Trae AI authentication token in settings
3. View usage statistics in the Explorer panel
files: |
*.vsix
draft: false
prerelease: false
# Auto-publish to VSCode Marketplace
- name: Publish to VSCode Marketplace
run: vsce publish -p ${{ secrets.VSCE_PAT }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
# Auto-publish to OpenVSX Registry
- name: Install ovsx
run: npm install -g ovsx
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
- name: Publish to OpenVSX Registry
run: ovsx publish *.vsix -p ${{ secrets.OVSX_PAT }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')