mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-02-06 15:05:19 +00:00
f4383a9e62
Fix the issue of releasing wamr-ide vscode extension: https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/10467675321/job/28987014745
74 lines
2.4 KiB
YAML
74 lines
2.4 KiB
YAML
# Copyright (C) 2019 Intel Corporation. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
name: build wamr-ide vscode extension
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
upload_url:
|
|
description: upload binary assets to the URL of release
|
|
type: string
|
|
required: true
|
|
ver_num:
|
|
description: a semantic version number.
|
|
type: string
|
|
required: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js 18.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18.x
|
|
|
|
- name: set vscode extension to correct version
|
|
run: |
|
|
npm install -g json
|
|
json -I -f package.json -e "this.version=\"${{ inputs.ver_num }}\""
|
|
working-directory: test-tools/wamr-ide/VSCode-Extension
|
|
|
|
- name: generate wamr ide vscode extension
|
|
run: |
|
|
npm install -g @vscode/vsce
|
|
rm -rf node_modules
|
|
npm install
|
|
vsce package
|
|
working-directory: test-tools/wamr-ide/VSCode-Extension
|
|
|
|
- name: publish wamr ide vscode extension to the vsce marketplace
|
|
if: ${{ github.repository == 'bytecodealliance/wasm-micro-runtime' }}
|
|
run: |
|
|
vsce publish -p ${{ secrets.TOKEN }}
|
|
working-directory: test-tools/wamr-ide/VSCode-Extension
|
|
|
|
- name: compress the vscode extension
|
|
run: |
|
|
mv wamride-*.vsix wamr-ide.vsix
|
|
tar czf wamr-ide-${{ inputs.ver_num }}.tar.gz wamr-ide.vsix
|
|
zip wamr-ide-${{ inputs.ver_num }}.zip wamr-ide.vsix
|
|
working-directory: test-tools/wamr-ide/VSCode-Extension
|
|
|
|
- name: upload release tar.gz
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ inputs.upload_url }}
|
|
asset_path: test-tools/wamr-ide/VSCode-Extension/wamr-ide-${{ inputs.ver_num }}.tar.gz
|
|
asset_name: wamr-ide-${{ inputs.ver_num }}.tar.gz
|
|
asset_content_type: application/x-gzip
|
|
|
|
- name: upload release zip
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ inputs.upload_url }}
|
|
asset_path: test-tools/wamr-ide/VSCode-Extension/wamr-ide-${{ inputs.ver_num }}.zip
|
|
asset_name: wamr-ide-${{ inputs.ver_num }}.zip
|
|
asset_content_type: application/zip
|