Skip to content

增加选择当前bsp功能 #15

增加选择当前bsp功能

增加选择当前bsp功能 #15

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # 手动触发
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # 使用与你的扩展兼容的Node.js版本
cache: 'npm'
- name: Install dependencies
run: npm install && cd src/vue && npm install && cd ../..
- name: compile
run: npm run compile
release:
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm install && cd src/vue && npm install && cd ../..
- name: Compile the extension
run: npm run compile
- name: Package the extension
run: |
npm install -g @vscode/vsce
vsce package
env:
NODE_ENV: production
- name: Get VSIX file name
id: get_vsix
run: echo "VSIX_FILE=$(ls *.vsix)" >> $GITHUB_ENV
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: v${{ github.run_number }}
release_name: "Release v${{ github.run_number }}"
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload VSIX to Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.VSIX_FILE }}
asset_name: ${{ env.VSIX_FILE }}
asset_content_type: application/octet-stream
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}