name: Publish to npm on: push: tags: - "*" permissions: id-token: write # Required for OIDC contents: read jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 with: node-version: "24" registry-url: "https://registry.npmjs.org" - name: Replace version placeholder run: | VERSION="${GITHUB_REF#refs/tags/}" echo "Publishing version: $VERSION" # Update package.json npm pkg set version=$VERSION - name: Install dependencies run: npm ci - name: Build run: npm run build - name: Publish to npm run: npm publish --access public