chore(deps-dev): bump @typescript-eslint/eslint-plugin from 7.18.0 to 8.23.0 #2
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: Publish Extension | |
on: | |
pull_request: | |
types: [closed] | |
workflow_dispatch: | |
env: | |
GIT_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'main' }} | |
jobs: | |
publish-extension: | |
runs-on: ubuntu-latest | |
if: > | |
( github.event_name == 'pull_request' && | |
github.event.pull_request.base.ref == 'main' && | |
contains(github.event.pull_request.title, 'Changeset version bump') ) || | |
github.event_name == 'workflow_dispatch' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.GIT_REF }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- name: Install Dependencies | |
run: | | |
npm install -g vsce ovsx | |
npm install | |
cd webview-ui | |
npm install | |
cd .. | |
- name: Package and Publish Extension | |
env: | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
OVSX_PAT: ${{ secrets.OVSX_PAT }} | |
run: | | |
current_package_version=$(node -p "require('./package.json').version") | |
# 构建并验证 VSIX 包 | |
npm run vsix | |
package=$(unzip -l bin/coolcline-${current_package_version}.vsix) | |
echo "$package" | |
echo "$package" | grep -q "dist/extension.js" || exit 1 | |
echo "$package" | grep -q "extension/webview-ui/build/assets/index.js" || exit 1 | |
echo "$package" | grep -q "extension/node_modules/@vscode/codicons/dist/codicon.ttf" || exit 1 | |
npm run publish:marketplace | |
echo "Successfully published version $current_package_version to VS Code Marketplace" | |