Skip to content

Conversation

@owlstronaut
Copy link
Contributor

@owlstronaut owlstronaut commented Jan 21, 2026

This pull request adds support for CircleCI as a provider of OpenID Connect (OIDC) tokens in CI environments, alongside existing support for GitHub Actions and GitLab. The implementation includes both code changes to detect and handle CircleCI OIDC tokens and new tests to ensure correct behavior.

Usage

In your .circleci/config.yml:

version: 2.1

jobs:
  publish:
    docker:
      - image: cimg/node:lts
    steps:
      - checkout
      - run:
          name: Publish to npm
          command: |
            NPM_AUDIENCE="npm:$(npm config get registry | sed 's|https\?://||;s|/$||')"
            NPM_ID_TOKEN=$(circleci run oidc get --claims "{\"aud\": \"$NPM_AUDIENCE\"}")
            npm publish

workflows:
  publish:
    jobs:
      - publish

Note: Unlike GitHub Actions and GitLab, CircleCI requires manually fetching the OIDC token with the correct audience claim using the circleci CLI.

@owlstronaut owlstronaut marked this pull request as ready for review January 22, 2026 19:02
@owlstronaut owlstronaut requested a review from a team as a code owner January 22, 2026 19:02
@owlstronaut owlstronaut force-pushed the owlstronaut/circle-ci-oidc branch from ead0f0f to 95b4403 Compare January 23, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant