build(deps-dev): bump typescript from 5.6.2 to 5.7.2 #91
This file contains 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: | |
release: | |
types: [created] | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Run tests | |
run: pnpm test | |
build-and-publish: | |
needs: test | |
if: github.event_name == 'release' && github.event.release.tag_name | |
permissions: | |
contents: read | |
id-token: write | |
name: Build and publish to npm registry | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
registry-url: https://registry.npmjs.org/ | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build package | |
run: pnpm run build | |
- name: Set package version | |
run: | | |
VERSION=${GITHUB_REF#refs/tags/v} | |
echo "Setting package version to $VERSION" | |
npm version $VERSION --no-git-tag-version --allow-same-version | |
- name: Publish to npm | |
run: npm publish --provenance --tag ${{ contains(github.ref, '-beta') && 'beta' || 'latest' }} | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} |