fix(ci): rewrite Capture release version step #37
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Type check | |
| run: pnpm run check | |
| - name: Build dist artifact | |
| run: pnpm run build | |
| - name: Verify dist CLI entrypoint | |
| run: node dist/cli.mjs --help | |
| - name: Validate install script syntax | |
| run: bash -n install.sh | |
| - name: Run smoke test | |
| run: bash scripts/test-smoke.sh | |
| - name: Run bootstrap test | |
| run: bash scripts/test-bootstrap.sh | |
| - name: Run adapter runtime test | |
| run: bash scripts/test-adapter-runtime.sh | |
| - name: Run MCP end-to-end test | |
| run: bash scripts/test-mcp-e2e.sh | |
| - name: Run wiki ingest test | |
| run: bash scripts/test-wiki-ingest.sh | |
| - name: Run wiki build test | |
| run: bash scripts/test-wiki-build.sh | |
| - name: Run wiki query file-back test | |
| run: bash scripts/test-wiki-query-fileback.sh | |
| - name: Run wiki lint test | |
| run: bash scripts/test-wiki-lint.sh | |
| - name: Capture release version | |
| id: release_meta | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Package release artifact | |
| run: pnpm run release:package | |
| - name: Run no-clone install test | |
| run: bash scripts/test-no-clone-install.sh | |
| - name: Upload Linux x64 release artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: memoria-linux-x64-v${{ steps.release_meta.outputs.version }} | |
| path: dist/release/memoria-linux-x64-v${{ steps.release_meta.outputs.version }}.tar.gz |