-
Notifications
You must be signed in to change notification settings - Fork 15
88 lines (76 loc) · 2.49 KB
/
Copy pathrelease.yml
File metadata and controls
88 lines (76 loc) · 2.49 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
78
79
80
81
82
83
84
85
86
87
88
name: Release
permissions:
contents: write
on:
workflow_dispatch:
push:
tags: ['v*']
jobs:
build:
name: Package (${{ matrix.vsce_target }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- vsce_target: linux-x64
goos: linux
goarch: amd64
- vsce_target: linux-arm64
goos: linux
goarch: arm64
- vsce_target: darwin-x64
goos: darwin
goarch: amd64
- vsce_target: darwin-arm64
goos: darwin
goarch: arm64
- vsce_target: win32-x64
goos: windows
goarch: amd64
- vsce_target: win32-arm64
goos: windows
goarch: arm64
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up mise
uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0
with:
version: 2025.6.8
- name: Install npm dependencies
run: npm ci
working-directory: vscode-extension
- name: Package VSIX
run: npx @vscode/vsce package --target ${{ matrix.vsce_target }}
working-directory: vscode-extension
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
- name: Upload VSIX to GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
run: gh release upload "$GITHUB_REF_NAME" vscode-extension/*.vsix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload VSIX as artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ matrix.vsce_target }}
path: vscode-extension/*.vsix
publish-marketplace:
name: Publish to VS Code Marketplace
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Set up mise
uses: jdx/mise-action@e6a8b3978addb5a52f2b4cd9d91eafa7f0ab959d # v4.2.0
with:
version: 2025.6.8
- name: Download all VSIX artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
- name: Publish to Marketplace
run: npx @vscode/vsce publish --packagePath $(find . -iname '*.vsix')
env:
VSCE_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}