-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.39 KB
/
publish.yml
File metadata and controls
59 lines (48 loc) · 1.39 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
# This workflow allows manual publishing to VS Code Marketplace
name: Publish to VS Code Marketplace
on:
workflow_dispatch:
inputs:
bump_version:
description: 'Bump version before publish (patch/minor/major), leave empty to use current version'
required: false
type: choice
options:
- ''
- patch
- minor
- major
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Configure Git
if: ${{ inputs.bump_version != '' }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump version
if: ${{ inputs.bump_version != '' }}
run: |
npm version ${{ inputs.bump_version }} -m "chore: bump version to %s"
git push
git push --tags
- name: Compile
run: npm run compile
- name: Publish to VS Code Marketplace
run: npx @vscode/vsce publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}