name: Publish to npm on: release: types: [published] permissions: contents: read concurrency: group: npm-publish-${{ github.event.release.tag_name }} cancel-in-progress: false jobs: publish: if: github.repository == 'nexryai/mintcss' runs-on: ubuntu-latest permissions: contents: read id-token: write steps: - uses: actions/checkout@v6 with: ref: ${{ github.event.release.tag_name }} persist-credentials: false - uses: actions/setup-node@v6 with: node-version: '24' registry-url: https://registry.npmjs.org package-manager-cache: false - name: Use npm with Trusted Publishing support run: npm install --global npm@11.20.0 - name: Verify release version run: node scripts/check-release.mjs env: RELEASE_TAG: ${{ github.event.release.tag_name }} RELEASE_PRERELEASE: ${{ github.event.release.prerelease }} - run: npm ci - name: Build package on GitHub Actions run: npm run build - name: Publish with OIDC and provenance run: npm publish --access public --provenance --tag "$NPM_DIST_TAG" env: NPM_DIST_TAG: ${{ github.event.release.prerelease && 'next' || 'latest' }}