-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (57 loc) · 1.84 KB
/
lint_build_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
58
59
60
61
62
63
64
65
66
67
68
name: Lint and build. Publish on tag/release creation
on: [ push ]
permissions:
contents: write
jobs:
lint_build_publish:
runs-on: ubuntu-latest
steps:
- name: Run Cimon (eBPF)
uses: cycodelabs/cimon-action@v0
with:
client-id: ${{ secrets.CIMON_CLIENT_ID }}
secret: ${{ secrets.CIMON_SECRET }}
allowed-hosts: >
registry.yarnpkg.com
marketplace.visualstudio.com
update.code.visualstudio.com
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Install dependencies
run: |
yarn ci
yarn global add @vscode/vsce ovsx
- name: Code Linting
run: yarn lint
- name: Build extension
run: vsce package
- name: Upload extension package to artifacts
uses: actions/upload-artifact@v4
with:
name: cycode-extension
path: "*.vsix"
if-no-files-found: error
- name: Publish extension to marketplaces
# it runs on tag creation only which starts with 'v' (e.g., v1.0.0)
if: startsWith(github.ref, 'refs/tags/v')
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
VSCE_PAT: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}
OVSX_PAT: ${{ secrets.OPEN_VSX_MARKETPLACE_TOKEN }}
run: |
vsce publish
ovsx publish
- name: Publish extension to GitHub Release
# it runs on tag creation only which starts with 'v' (e.g., v1.0.0)
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
file: "*.vsix"
file_glob: true
tag: ${{ github.ref }}
overwrite: true