feat(launch): align analyzer query.detail with protocol v1.6 #807
Workflow file for this run
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' | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags: | |
| - 'v*' | |
| - 'p*' | |
| paths-ignore: | |
| - '**.md' | |
| - '.vscode' | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| - name: Use Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'pnpm' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: pnpm i | |
| - name: Change Extension Version | |
| shell: bash | |
| run: | | |
| is_release=${{ startsWith(github.ref, 'refs/tags/v') }} | |
| is_prerelease=${{ startsWith(github.ref, 'refs/tags/p') }} | |
| if $is_release || $is_prerelease; then | |
| ver=${{ github.ref_name }} | |
| ver=${ver:1} | |
| else | |
| ver=`git describe --tags --match "v*" --long | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+)-([0-9]+)-g([a-f0-9]+)/\1-post.\2-ci.g\3/'`-`git rev-parse --abbrev-ref HEAD | sed 's#/#-#' | sed 's#_#-#'` | |
| fi | |
| echo "Change version to ${ver}" | |
| npm --prefix release pkg set version=${ver} | |
| - name: Build extension | |
| shell: bash | |
| run: | | |
| node scripts/build.mjs | |
| - name: Lint check | |
| shell: bash | |
| run: | | |
| npm run lint | |
| - name: Package extension | |
| shell: bash | |
| run: | | |
| is_prerelease=${{ startsWith(github.ref, 'refs/tags/p') }} | |
| npm i -g @vscode/vsce | |
| cd release | |
| if $is_prerelease; then | |
| vsce package --pre-release | |
| else | |
| vsce package | |
| fi | |
| mkdir vsix | |
| cp *.vsix vsix/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: maa-support-extension | |
| path: 'release/vsix' | |
| - name: Publish packages | |
| if: github.ref == 'refs/heads/main' | |
| shell: bash | |
| run: | | |
| for pkg in simple-parser maa-tasker maa-locale maa-version-manager maa-pipeline-manager maa-tools prettier-plugin-maafw-sort; do | |
| cd pkgs/$pkg | |
| PKG_NAME=`npm pkg get name | jq -r` | |
| PKG_VER=`npm pkg get version | jq -r` | |
| if npm view ${PKG_NAME}@${PKG_VER} > /dev/null 2> /dev/null; then | |
| echo "Skip $PKG_NAME" | |
| else | |
| echo "Publish $PKG_NAME" | |
| pnpm publish --provenance --no-git-checks | |
| fi | |
| cd - > /dev/null | |
| done | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: assets | |
| - name: Use Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Install vsce | |
| run: | | |
| npm i -g vsce | |
| - name: Publish | |
| run: | | |
| vsce publish -p ${{ secrets.VSCE_TOKEN }} --packagePath assets/maa-support-extension/*.vsix | |
| prerelease: | |
| if: startsWith(github.ref, 'refs/tags/p') | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: assets | |
| - name: Use Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Install vsce | |
| run: | | |
| npm i -g vsce | |
| - name: Publish | |
| run: | | |
| vsce publish -p ${{ secrets.VSCE_TOKEN }} --packagePath assets/maa-support-extension/*.vsix --pre-release |