fix: pin google-genai < 2.0.0 in Gemini agent templates (#1433) #34
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: Prerelease Tarball | |
| on: | |
| push: | |
| branches: [main] | |
| # Manually trigger to pull in the latest CDK constructs changes | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: prerelease-tarball | |
| cancel-in-progress: true | |
| jobs: | |
| prerelease-tarball: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| TARBALL_BASE: agentcore-cli-prerelease | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - uses: astral-sh/setup-uv@v7 | |
| - name: Generate GitHub App Token | |
| id: app-token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ vars.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| owner: aws | |
| - name: Clone CDK repo | |
| run: | | |
| git clone --depth 1 "https://x-access-token:${CDK_REPO_TOKEN}@github.com/${CDK_REPO}.git" /tmp/cdk-repo | |
| env: | |
| CDK_REPO_TOKEN: ${{ steps.app-token.outputs.token }} | |
| CDK_REPO: ${{ secrets.CDK_REPO_NAME }} | |
| - name: Compute version suffix | |
| id: version | |
| run: | | |
| CLI_SHA=$(git rev-parse --short=5 HEAD) | |
| CDK_SHA=$(git -C /tmp/cdk-repo rev-parse --short=5 HEAD) | |
| SUFFIX="${CLI_SHA}-${CDK_SHA}" | |
| echo "suffix=$SUFFIX" >> $GITHUB_OUTPUT | |
| echo "Version suffix: $SUFFIX" | |
| - run: npm run bundle | |
| env: | |
| AGENTCORE_CDK_PATH: /tmp/cdk-repo | |
| AGENTCORE_TARBALL_OUTPUT: ${{ env.TARBALL_BASE }} | |
| AGENTCORE_TARBALL_VERSION_SUFFIX: ${{ steps.version.outputs.suffix }} | |
| - name: Create or update prerelease | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| VERSION_SUFFIX: ${{ steps.version.outputs.suffix }} | |
| run: | | |
| TAG="prerelease" | |
| # Delete existing release if it exists (to update the tarballs) | |
| gh release delete "$TAG" --yes --cleanup-tag 2>/dev/null || true | |
| # Create a new pre-release with both tarballs | |
| gh release create "$TAG" \ | |
| "${TARBALL_BASE}.tgz" \ | |
| "${TARBALL_BASE}-preview.tgz" \ | |
| --title "Prerelease" \ | |
| --notes "Auto-generated tarballs from the latest commit on main. | |
| Version: \`${VERSION_SUFFIX}\` (cli-cdk) | |
| **GA build** (no harness features): | |
| \`\`\` | |
| npm install -g https://github.com/aws/agentcore-cli/releases/download/prerelease/${TARBALL_BASE}.tgz | |
| \`\`\` | |
| **Preview build** (harness features enabled): | |
| \`\`\` | |
| npm install -g https://github.com/aws/agentcore-cli/releases/download/prerelease/${TARBALL_BASE}-preview.tgz | |
| \`\`\`" \ | |
| --prerelease \ | |
| --target "${{ github.sha }}" |