-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (81 loc) · 2.34 KB
/
Copy pathmain.yml
File metadata and controls
83 lines (81 loc) · 2.34 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
name: CI
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
release:
types:
- published
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
outputs:
vsixPath: ${{ steps.packageExtension.outputs.vsixPath }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 22
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
- name: Run tests
run: npm test
if: runner.os == 'macOS'
- name: Run tests (Linux)
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- name: Package Extension
id: packageExtension
uses: HaaLeo/publish-vscode-extension@v2
with:
pat: stub
dryRun: true
- name: Upload Extension Package as Artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.os }}
path: ${{ steps.packageExtension.outputs.vsixPath }}
publish:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 22
- name: Install dependencies
run: npm ci
- name: GitHub Release
uses: softprops/action-gh-release@v2.5.0
with:
generate_release_notes: true
body: |
# Summary
See [changelog](https://github.com/asux/vscode-rspec-focus/blob/main/CHANGELOG.md#changelog)
name: ${{ github.ref_name }}
fail_on_unmatched_files: true
files: ${{ needs.build.outputs.vsixPath }}
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v2
id: publishToOpenVSX
with:
pat: ${{ secrets.OVSX_PAT }}
extensionFile: ${{ needs.build.outputs.vsixPath }}
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v2
with:
pat: ${{ secrets.VSCE_PAT }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ needs.build.outputs.vsixPath }}