Deploy CodeChecker VSCode extension #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |