-
Notifications
You must be signed in to change notification settings - Fork 3
57 lines (48 loc) · 1.31 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
name: publish
permissions:
contents: write
on:
push:
tags:
- '*'
env:
VSIX_NAME: y3-helper-${{ github.ref_name }}.vsix
jobs:
publish:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Compile Client
shell: bash
run: |
npm install
npm install -g typescript
tsc -p ./
- name: Pack vsix
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.Y3_COMMIT_TOKEN }}
run: |
npm install -g @vscode/vsce
git config --global user.email "[email protected]"
git config --global user.name "最萌小汐(机械飞升)"
vsce package -o "${{ env.VSIX_NAME }}" ${{ github.ref_name }}
git pull
git push
- name: Upload vsix
uses: actions/upload-artifact@v4
with:
name: ${{ env.VSIX_NAME }}
path: ${{ env.VSIX_NAME }}
- name: Publish Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.Y3_COMMIT_TOKEN }}
with:
generate_release_notes: true
files: |
${{ env.VSIX_NAME }}
- name: Publish to VSCode Market
run: vsce publish -i ${{ env.VSIX_NAME }} -p ${{ secrets.VSCODE_TOKEN }}