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: Get version from tag id: version run: | VERSION="${GITHUB_REF#refs/tags/}" echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Update package.json version run: npm pkg set version=${{ steps.version.outputs.version }} - name: Install dependencies run: npm ci - name: Build run: npm run build - name: Publish to npm run: npm publish --access public