-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.41 KB
/
Copy pathrelease.yml
File metadata and controls
60 lines (49 loc) · 1.41 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
name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
version:
description: "Release version without leading v. Must match package.json."
required: true
type: string
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install
run: npm ci
- name: Verify release metadata
env:
RELEASE_VERSION: ${{ inputs.version }}
run: npm run release:verify:metadata
- name: Test
run: npm test
- name: Package VSIX
run: npm run vsix
- name: Verify VSIX
env:
RELEASE_VERSION: ${{ inputs.version }}
run: npm run release:verify
- name: Publish to VS Code Marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: npx @vscode/vsce publish --packagePath dist/JumpProto.vsix -p "$VSCE_PAT"
- name: Publish to Open VSX
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: npx ovsx publish dist/JumpProto.vsix -p "$OVSX_PAT"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_type == 'tag' && github.ref_name || format('v{0}', inputs.version) }}
files: dist/JumpProto.vsix