This repository was archived by the owner on Aug 6, 2026. It is now read-only.
fix(agent): treat an emptied sandbox env file as GitHub logout (#3611) #803
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| - name: Set up Node 24 | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 24 | |
| cache: "pnpm" | |
| - 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 and test agent release | |
| uses: ./.github/actions/build-agent-release | |
| - name: Publish the package to npm registry | |
| working-directory: packages/agent | |
| run: pnpm publish --access public --no-git-checks | |
| env: | |
| NPM_CONFIG_PROVENANCE: true | |
| rebuild-sandbox-images: | |
| name: Rebuild tasks sandbox base images | |
| needs: release | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Mint posthog/posthog workflow dispatch token | |
| id: dispatch-token | |
| uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0 | |
| with: | |
| app-id: ${{ secrets.GH_APP_POSTHOG_WORKFLOW_TRIGGER_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_POSTHOG_WORKFLOW_TRIGGER_PRIVATE_KEY }} | |
| owner: PostHog | |
| repositories: posthog | |
| - name: Dispatch posthog/posthog sandbox image rebuild | |
| env: | |
| GH_TOKEN: ${{ steps.dispatch-token.outputs.token }} | |
| run: | | |
| echo "Dispatching sandbox base image rebuild for $GITHUB_REF_NAME" | |
| gh workflow run cd-sandbox-base-image.yml \ | |
| --repo PostHog/posthog \ | |
| --ref master |