build(ci): call VS Code CI tasks in release.yml workflow (#1920)

Since this PR, CI runs VS Code tasks exact after built binaries and
before `dist host`. This is to ensure that the vscode artifacts are
available when undraft the releases.
This commit is contained in:
Myriad-Dreamin 2025-07-29 16:21:34 +08:00 committed by GitHub
parent 315168da1f
commit e9ae352dfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 338 additions and 314 deletions

View file

@ -101,57 +101,6 @@ jobs:
- name: Test tinymist
run: cargo test --workspace -- --skip=e2e
checks-e2e:
needs: [build-binary]
strategy:
matrix:
include:
- os: windows-2022
rust-target: x86_64-pc-windows-msvc
platform: win32
arch: x64
- os: windows-latest
rust-target: x86_64-pc-windows-msvc
platform: win32
arch: x64
- os: ubuntu-22.04
rust-target: x86_64-unknown-linux-gnu
platform: linux
arch: x64
- os: ubuntu-latest
rust-target: x86_64-unknown-linux-gnu
platform: linux
arch: x64
- os: macos-latest
rust-target: aarch64-apple-darwin
platform: darwin
arch: arm64
name: E2E Tests (${{ matrix.platform }}-${{ matrix.arch }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Download tinymist binary artifact
uses: actions/download-artifact@v4
with:
name: artifacts-build-local-${{ matrix.rust-target }}
path: editors/vscode/out
- name: Unzip tinymist binary artifact (Windows)
run: 7z x -y -oeditors/vscode/out editors/vscode/out/tinymist-${{ matrix.rust-target }}.zip
if: matrix.platform == 'win32'
- name: Unzip tinymist binary artifact (Linux)
run: |
tar -xvf editors/vscode/out/tinymist-${{ matrix.rust-target }}.tar.gz -C editors/vscode/out
mv editors/vscode/out/tinymist-${{ matrix.rust-target }}/tinymist editors/vscode/out/tinymist
if: matrix.platform != 'win32'
- name: Test Tinymist (E2E)
run: cargo test -p tests -- e2e
- name: Upload Tinymist E2E Test Snapshot
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-snapshot-${{ matrix.rust-target }}-${{ matrix.os }}
path: target/e2e
prepare-build:
runs-on: "ubuntu-latest"
outputs:
@ -170,33 +119,12 @@ jobs:
# with:
# tag: ${{ needs.prepare-build.outputs.tag }}
build-binary:
build:
needs: [prepare-build] # , announce
permissions:
contents: write
uses: ./.github/workflows/release.yml
secrets: inherit
with:
tag: ${{ (startsWith(github.ref, 'refs/tags/') && needs.prepare-build.outputs.tag) || '' }}
targets: ${{ (!startsWith(github.ref, 'refs/tags/') && 'aarch64-apple-darwin,x86_64-pc-windows-msvc,x86_64-unknown-linux-gnu') || 'all' }}
build-vsc-assets:
needs: [build-binary]
uses: ./.github/workflows/build-vsc-assets.yml
build-vscode:
needs: [build-binary, build-vsc-assets]
uses: ./.github/workflows/build-vscode.yml
build-vscode-others:
needs: [build-vsc-assets]
uses: ./.github/workflows/build-vscode-others.yml
publish-vscode:
needs: [build-vscode, build-vscode-others] # , announce
permissions:
contents: write
uses: ./.github/workflows/publish-vscode.yml
secrets:
VSCODE_MARKETPLACE_TOKEN: ${{ secrets.VSCODE_MARKETPLACE_TOKEN }}
OPENVSX_ACCESS_TOKEN: ${{ secrets.OPENVSX_ACCESS_TOKEN }}