fix(auth): improved refresh token logic & token handling (#1066) #443
Workflow file for this run
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: Release Agent | |
| on: | |
| push: | |
| tags: | |
| - "agent-v*" | |
| concurrency: | |
| group: agent-release | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| name: Publish agent to npm | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Set up Node 24 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: "pnpm" | |
| registry-url: https://registry.npmjs.org | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| TAG_VERSION="${GITHUB_REF#refs/tags/agent-v}" | |
| echo "Version: $TAG_VERSION" | |
| echo "version=$TAG_VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Set version in package.json | |
| env: | |
| APP_VERSION: ${{ steps.version.outputs.version }} | |
| run: | | |
| jq --arg v "$APP_VERSION" '.version = $v' packages/agent/package.json > tmp.json && mv tmp.json packages/agent/package.json | |
| echo "Set packages/agent/package.json version to $APP_VERSION" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build shared (agent dependency) | |
| run: pnpm --filter @posthog/shared run build | |
| - name: Build git (agent dependency) | |
| run: pnpm --filter @twig/git run build | |
| - name: Build the package | |
| run: pnpm --filter agent run build | |
| - name: Run tests | |
| run: pnpm --filter agent run test | |
| - name: Ensure modern npm (OIDC support) | |
| run: npm install -g npm@11.6.4 | |
| - name: Publish the package to npm registry | |
| working-directory: packages/agent | |
| run: pnpm publish --access public --no-git-checks | |
| env: | |
| NPM_CONFIG_PROVENANCE: true | |
| NODE_AUTH_TOKEN: '' |