-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (54 loc) · 1.85 KB
/
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
69
on:
push:
tags:
- "*"
# These permissions are needed to assume roles from Github's OIDC.
permissions:
contents: write
id-token: write
name: Publish Extension
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install devbox
uses: jetify-com/[email protected]
with:
enable-cache: 'true'
- name: Install vendors
run: devbox run yarn install --frozen-lockfile
- name: Compile codebase
run: devbox run yarn run compile
- name: Run linters
run: devbox run yarn run lint
publish:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install devbox
uses: jetify-com/[email protected]
with:
enable-cache: 'true'
- name: Install vendors
run: devbox run yarn install --frozen-lockfile --production
- id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
# Secrets placed in the ci/repo/grafana/<repo>/<path> path in Vault
repo_secrets: |
OPEN_VSX_TOKEN=openvsx:token
VS_MARKETPLACE_TOKEN=vscode-marketplace:token
- name: Create extension package
run: devbox run vsce package --out grafana-vscode.vsix
- name: Publish to Open VSX
run: devbox run npx --yes [email protected] publish --pat ${{ env.OPEN_VSX_TOKEN }} --packagePath grafana-vscode.vsix
- name: Publish to Visual Studio Marketplace
run: devbox run vsce publish --pat ${{ env.VS_MARKETPLACE_TOKEN }} --packagePath grafana-vscode.vsix
- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "grafana-vscode.vsix"
token: ${{ secrets.GITHUB_TOKEN }}