-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (54 loc) · 1.77 KB
/
deploy.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
name: Deploy CodeChecker VSCode extension
# Triggers the workflow when a new release is published.
on:
release:
types: [published]
jobs:
version:
name: Get version number
runs-on: ubuntu-22.04
steps:
- name: Get the version
id: get_version
run: echo version=${GITHUB_REF#refs/tags/} >>$GITHUB_OUTPUT
outputs:
version: ${{ steps.get_version.outputs.version }}
test:
uses: ./.github/workflows/test.yml
package:
needs: [version]
uses: ./.github/workflows/package.yml
with:
version: ${{ needs.version.outputs.version }}
build:
name: Create extension
runs-on: ubuntu-22.04
needs: [test, package, version]
# Each registry should have the following fields:
# - name: unique extension id.
# - registryUrl: the created vsix package will be published to this registry.
# - token: github secret name which will be used to publish the created package.
strategy:
matrix:
registry: [open-vsx, vs-marketplace]
include:
- registry: open-vsx
name: codechecker
registryUrl: https://open-vsx.org
token: OPEN_VSX_TOKEN
- registry: vs-marketplace
name: vscode-codechecker
registryUrl: https://marketplace.visualstudio.com
token: VS_MARKETPLACE_TOKEN
steps:
- name: Get vsix artifact
uses: actions/download-artifact@v3
with:
name: ${{ matrix.registry }}-package
- name: Publish package
if: success()
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets[matrix.token] }}
registryUrl: ${{ matrix.registryUrl }}
extensionFile: ./${{ matrix.name }}-${{ needs.version.outputs.version }}.vsix