mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-04-02 20:09:00 +08:00
chore(ci): 禁用 VS Code 扩展发布工作流
- 注释掉整个 GitHub Actions 工作流配置文件 - 暂时停用扩展发布到 Visual Studio Marketplace 的功能 - 保留原始配置代码以备后续启用
This commit is contained in:
parent
01616c745d
commit
642f2641ec
188
.github/workflows/publish-vscode-extension.yml
vendored
188
.github/workflows/publish-vscode-extension.yml
vendored
@ -1,94 +1,94 @@
|
|||||||
name: Publish VS Code Extension
|
#name: Publish VS Code Extension
|
||||||
|
#
|
||||||
on:
|
#on:
|
||||||
workflow_dispatch:
|
# workflow_dispatch:
|
||||||
inputs:
|
# inputs:
|
||||||
version:
|
# version:
|
||||||
description: Extension version to publish, for example 0.1.0. Leave empty to use package.json or the pushed tag.
|
# description: Extension version to publish, for example 0.1.0. Leave empty to use package.json or the pushed tag.
|
||||||
required: false
|
# required: false
|
||||||
type: string
|
# type: string
|
||||||
publish_to_marketplace:
|
# publish_to_marketplace:
|
||||||
description: Publish to the Visual Studio Marketplace after packaging.
|
# description: Publish to the Visual Studio Marketplace after packaging.
|
||||||
required: true
|
# required: true
|
||||||
type: boolean
|
# type: boolean
|
||||||
default: true
|
# default: true
|
||||||
push:
|
# push:
|
||||||
tags:
|
# tags:
|
||||||
- 'gframework-config-tool-v*'
|
# - 'gframework-config-tool-v*'
|
||||||
|
#
|
||||||
permissions:
|
#permissions:
|
||||||
contents: read
|
# contents: read
|
||||||
|
#
|
||||||
jobs:
|
#jobs:
|
||||||
publish:
|
# publish:
|
||||||
name: Package And Publish Marketplace Extension
|
# name: Package And Publish Marketplace Extension
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
|
#
|
||||||
defaults:
|
# defaults:
|
||||||
run:
|
# run:
|
||||||
working-directory: tools/vscode-config-extension
|
# working-directory: tools/vscode-config-extension
|
||||||
|
#
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout repository
|
# - name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
# uses: actions/checkout@v6
|
||||||
with:
|
# with:
|
||||||
fetch-depth: 0
|
# fetch-depth: 0
|
||||||
|
#
|
||||||
- name: Setup Node.js 20
|
# - name: Setup Node.js 20
|
||||||
uses: actions/setup-node@v5
|
# uses: actions/setup-node@v5
|
||||||
with:
|
# with:
|
||||||
node-version: 20
|
# node-version: 20
|
||||||
|
#
|
||||||
- name: Setup Bun
|
# - name: Setup Bun
|
||||||
uses: oven-sh/setup-bun@v2
|
# uses: oven-sh/setup-bun@v2
|
||||||
with:
|
# with:
|
||||||
bun-version: 1.2.15
|
# bun-version: 1.2.15
|
||||||
|
#
|
||||||
- name: Determine extension version
|
# - name: Determine extension version
|
||||||
id: version
|
# id: version
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
set -euo pipefail
|
# set -euo pipefail
|
||||||
|
#
|
||||||
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
# PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
||||||
VERSION="${PACKAGE_VERSION}"
|
# VERSION="${PACKAGE_VERSION}"
|
||||||
|
#
|
||||||
if [[ "${GITHUB_REF:-}" == refs/tags/gframework-config-tool-v* ]]; then
|
# if [[ "${GITHUB_REF:-}" == refs/tags/gframework-config-tool-v* ]]; then
|
||||||
VERSION="${GITHUB_REF#refs/tags/gframework-config-tool-v}"
|
# VERSION="${GITHUB_REF#refs/tags/gframework-config-tool-v}"
|
||||||
elif [[ -n "${{ inputs.version || '' }}" ]]; then
|
# elif [[ -n "${{ inputs.version || '' }}" ]]; then
|
||||||
VERSION="${{ inputs.version }}"
|
# VERSION="${{ inputs.version }}"
|
||||||
fi
|
# fi
|
||||||
|
#
|
||||||
echo "Resolved extension version: ${VERSION}"
|
# echo "Resolved extension version: ${VERSION}"
|
||||||
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
|
# echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
|
||||||
|
#
|
||||||
- name: Install extension dependencies
|
# - name: Install extension dependencies
|
||||||
run: bun install
|
# run: bun install
|
||||||
|
#
|
||||||
- name: Synchronize package.json version
|
# - name: Synchronize package.json version
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
set -euo pipefail
|
# set -euo pipefail
|
||||||
node -e "const fs=require('fs'); const path='package.json'; const data=JSON.parse(fs.readFileSync(path,'utf8')); data.version='${{ steps.version.outputs.version }}'; fs.writeFileSync(path, JSON.stringify(data, null, 2) + '\n');"
|
# node -e "const fs=require('fs'); const path='package.json'; const data=JSON.parse(fs.readFileSync(path,'utf8')); data.version='${{ steps.version.outputs.version }}'; fs.writeFileSync(path, JSON.stringify(data, null, 2) + '\n');"
|
||||||
|
#
|
||||||
- name: Run extension tests
|
# - name: Run extension tests
|
||||||
run: bun run test
|
# run: bun run test
|
||||||
|
#
|
||||||
- name: Package VSIX
|
# - name: Package VSIX
|
||||||
run: |
|
# run: |
|
||||||
set -euo pipefail
|
# set -euo pipefail
|
||||||
mkdir -p ../../artifacts
|
# mkdir -p ../../artifacts
|
||||||
bun run package:vsix -- --out "../../artifacts/gframework-config-tool-${{ steps.version.outputs.version }}.vsix"
|
# bun run package:vsix -- --out "../../artifacts/gframework-config-tool-${{ steps.version.outputs.version }}.vsix"
|
||||||
|
#
|
||||||
- name: Upload VSIX artifact
|
# - name: Upload VSIX artifact
|
||||||
uses: actions/upload-artifact@v7
|
# uses: actions/upload-artifact@v7
|
||||||
with:
|
# with:
|
||||||
name: gframework-config-tool-vsix
|
# name: gframework-config-tool-vsix
|
||||||
path: artifacts/gframework-config-tool-${{ steps.version.outputs.version }}.vsix
|
# path: artifacts/gframework-config-tool-${{ steps.version.outputs.version }}.vsix
|
||||||
if-no-files-found: error
|
# if-no-files-found: error
|
||||||
|
#
|
||||||
- name: Publish to Visual Studio Marketplace
|
# - name: Publish to Visual Studio Marketplace
|
||||||
if: github.event_name == 'push' || inputs.publish_to_marketplace
|
# if: github.event_name == 'push' || inputs.publish_to_marketplace
|
||||||
env:
|
# env:
|
||||||
VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
# VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
||||||
run: bun run publish:marketplace
|
# run: bun run publish:marketplace
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user