fix: incorrect analytics code #1379
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: Test & Release | |
| on: [push, pull_request] | |
| env: | |
| CI: false | |
| jobs: | |
| tests: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [ '18', '20' ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'pnpm' | |
| - run: pnpm install --frozen-lockfile | |
| working-directory: ./next-cloudinary | |
| - run: pnpm test | |
| working-directory: ./next-cloudinary | |
| - run: pnpm test:app | |
| working-directory: ./next-cloudinary | |
| release: | |
| name: Release | |
| if: ${{ github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'beta') }} | |
| needs: tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22.14.0' | |
| cache: 'pnpm' | |
| # @semantic-release/npm bundles its own `npm` dependency, but under pnpm's | |
| # dependency isolation that copy isn't reachable via execa's `preferLocal` from | |
| # other packages - it falls back to whatever `npm` is on PATH. That needs to be | |
| # recent enough to support Trusted Publishers (OIDC), hence installing it here | |
| # explicitly rather than relying on whatever Node bundles. | |
| - run: npm install -g npm@11 | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Overrides the workflow-level `CI: false` (see top of file) for this step only. | |
| # npm's OIDC/trusted-publishing detection relies on the `ci-info` package, which | |
| # treats `CI=false` as "disable all CI detection" and silently never sets | |
| # ciInfo.GITHUB_ACTIONS - which made npm's own OIDC code silently no-op during | |
| # the actual `npm publish` call (no log output, straight to a plain ENEEDAUTH), | |
| # even though semantic-release/npm's own verifyConditions check (which uses a | |
| # different, unaffected library to detect GitHub Actions) succeeded. Confirmed | |
| # via the full silly-level publish log, not inferred. | |
| CI: true | |