chore: update TypeScript SDK to v7.0.0-rc.9 #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: Publish Package | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| id-token: write # required for npm trusted publishing (OIDC) | |
| contents: read | |
| concurrency: | |
| group: publish-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Validate tag matches package version | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| shell: bash | |
| run: | | |
| PKG_VERSION="$(node -p "require('./package.json').version")" | |
| TAG_VERSION="${GITHUB_REF_NAME#v}" | |
| if [[ "$TAG_VERSION" != "$PKG_VERSION" ]]; then | |
| echo "Tag version ($TAG_VERSION) does not match package.json version ($PKG_VERSION)." | |
| exit 1 | |
| fi | |
| - name: Install dependencies | |
| run: npm install --ignore-scripts --no-audit --no-fund | |
| - name: Prepare release (sanitize README) | |
| run: node scripts/prepare_release.js | |
| - name: Build package | |
| run: npm run build | |
| - name: Verify package contents | |
| run: npm pack --dry-run --ignore-scripts | |
| - name: Choose npm dist-tag | |
| id: npm_dist_tag | |
| shell: bash | |
| run: | | |
| VERSION="$(node -p "require('./package.json').version")" | |
| if [[ "$VERSION" == *-* ]]; then | |
| echo "tag=next" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "tag=latest" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Publish to npm (OIDC) | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: npm publish --provenance --tag "${{ steps.npm_dist_tag.outputs.tag }}" --ignore-scripts |