|
43 | 43 | BROWSERBASE_API_KEY: ${{ secrets.BROWSERBASE_API_KEY }}
|
44 | 44 | BROWSERBASE_PROJECT_ID: ${{ secrets.BROWSERBASE_PROJECT_ID }}
|
45 | 45 | ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
| 46 | + GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} |
46 | 47 | run: |
|
47 | 48 | pnpm test
|
48 |
| -
|
49 |
| - publish: |
50 |
| - name: Publish to NPM |
51 |
| - runs-on: ubuntu-latest |
52 |
| - needs: test |
53 |
| - if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
54 |
| - |
55 |
| - steps: |
56 |
| - - name: Checkout code |
57 |
| - uses: actions/checkout@v4 |
58 |
| - with: |
59 |
| - fetch-depth: 0 |
60 |
| - token: ${{ secrets.GITHUB_TOKEN }} |
61 |
| - |
62 |
| - - name: Setup Node.js |
63 |
| - uses: actions/setup-node@v4 |
64 |
| - with: |
65 |
| - node-version: '18' |
66 |
| - cache: 'pnpm' |
67 |
| - registry-url: 'https://registry.npmjs.org' |
68 |
| - |
69 |
| - - name: Install pnpm |
70 |
| - uses: pnpm/action-setup@v4 |
71 |
| - with: |
72 |
| - version: 8 |
73 |
| - |
74 |
| - - name: Install dependencies |
75 |
| - run: pnpm install --frozen-lockfile |
76 |
| - |
77 |
| - - name: Configure git |
78 |
| - run: | |
79 |
| - git config --global user.name 'github-actions[bot]' |
80 |
| - git config --global user.email 'github-actions[bot]@users.noreply.github.com' |
81 |
| - |
82 |
| - - name: Bump version |
83 |
| - id: version |
84 |
| - run: | |
85 |
| - # Get current version from package.json |
86 |
| - CURRENT_VERSION=$(node -p "require('./package.json').version") |
87 |
| - echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT |
88 |
| - |
89 |
| - # Bump minor version |
90 |
| - npm version minor --no-git-tag-version |
91 |
| - |
92 |
| - # Get new version |
93 |
| - NEW_VERSION=$(node -p "require('./package.json').version") |
94 |
| - echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT |
95 |
| - |
96 |
| - # Commit version bump |
97 |
| - git add package.json pnpm-lock.yaml |
98 |
| - git commit -m "chore: bump version to $NEW_VERSION [skip ci]" |
99 |
| - |
100 |
| - - name: Build for production |
101 |
| - run: pnpm build |
102 |
| - |
103 |
| - - name: Publish to NPM |
104 |
| - env: |
105 |
| - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
106 |
| - run: pnpm publish --no-git-checks |
107 |
| - |
108 |
| - - name: Create git tag |
109 |
| - run: | |
110 |
| - git tag "v${{ steps.version.outputs.new_version }}" |
111 |
| - |
112 |
| - - name: Push changes and tags |
113 |
| - run: | |
114 |
| - git push origin main |
115 |
| - git push origin "v${{ steps.version.outputs.new_version }}" |
0 commit comments