feat(ai): 补充 flow 缩写语义,提升 prompt 可读性 #72
This file contains hidden or 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: 'Release VSCode Extension' | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8 | |
| run_install: false | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm i | |
| - name: Update version | |
| run: | | |
| if [[ "${{ github.ref }}" == refs/tags/v* ]]; then | |
| ver=${{ github.ref_name }} | |
| ver=${ver:1} | |
| else | |
| desc=$(git describe --tags --long --match "v*" 2>/dev/null || echo "v0.0.1-0-g0000000") | |
| ver=$(echo "$desc" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+)-([0-9]+)-g.*/\1-post.\2/') | |
| fi | |
| echo "Setting version to ${ver}" | |
| npm pkg set version=${ver} | |
| npm --prefix src-vscode pkg set version=${ver} | |
| - name: Build webview | |
| run: pnpm build:vscode | |
| - name: Install extension dependencies | |
| working-directory: src-vscode | |
| run: npm install | |
| - name: Build extension | |
| working-directory: src-vscode | |
| run: | | |
| npm run compile | |
| - name: Package extension | |
| working-directory: src-vscode | |
| run: | | |
| npm i -g @vscode/vsce | |
| vsce package | |
| mkdir -p vsix | |
| mv *.vsix vsix/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: maa-log-analyzer-extension | |
| path: 'src-vscode/vsix' | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: assets | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Install vsce | |
| run: npm i -g @vscode/vsce | |
| - name: Publish | |
| run: | | |
| vsce publish -p ${{ secrets.VSCE_TOKEN }} --packagePath assets/maa-log-analyzer-extension/*.vsix |