Fix query index cleanup UX and docs #8
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: TypeScript SDK | |
| on: | |
| pull_request: | |
| paths: | |
| - ".github/workflows/typescript-sdk.yml" | |
| - "sdk/typescript/**" | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - ".github/workflows/typescript-sdk.yml" | |
| - "sdk/typescript/**" | |
| tags: | |
| - "redis-afs-v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Test package | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: sdk/typescript | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| cache: npm | |
| cache-dependency-path: sdk/typescript/package-lock.json | |
| - run: npm ci | |
| - run: npm test | |
| - run: npm run pack:dry-run | |
| publish: | |
| name: Publish package | |
| needs: test | |
| if: startsWith(github.ref, 'refs/tags/redis-afs-v') | |
| runs-on: ubuntu-latest | |
| environment: npm | |
| permissions: | |
| contents: read | |
| id-token: write | |
| defaults: | |
| run: | |
| working-directory: sdk/typescript | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| registry-url: "https://registry.npmjs.org" | |
| cache: npm | |
| cache-dependency-path: sdk/typescript/package-lock.json | |
| - run: npm ci | |
| - name: Verify tag matches package version | |
| run: | | |
| package_version="$(node -p "require('./package.json').version")" | |
| tag_version="${GITHUB_REF_NAME#redis-afs-v}" | |
| if [ "$package_version" != "$tag_version" ]; then | |
| echo "Tag redis-afs-v${tag_version} does not match package.json version ${package_version}." | |
| exit 1 | |
| fi | |
| - run: npm publish |