Skip to content

Commit

Permalink
Switch to yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Apr 8, 2024
1 parent d59e88d commit d30a9b7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,23 +169,20 @@ jobs:
repository: 'PostHog/posthog.com'
token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }}

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
cache: yarn

- name: Install new posthog-js version in posthog.com repo
id: pnpm-upgrade
id: yarn-upgrade
run: |
OUTGOING_VERSION=$(jq '.dependencies["posthog-js"]' package.json -r)
echo "outgoing-version=$OUTGOING_VERSION" >> "$GITHUB_OUTPUT"
for i in $(seq 1 $RETRY_TIMES); do
# Retry loop because of npm being _eventually_ consistent
if pnpm upgrade posthog-js@${{ env.COMMITTED_VERSION }}; then
if yarn upgrade posthog-js@${{ env.COMMITTED_VERSION }}; then
break
else
[ $i -ne $RETRY_TIMES ] && sleep $RETRY_WAIT_SECONDS || false
Expand Down

0 comments on commit d30a9b7

Please sign in to comment.