Skip to content

refactor(posthog-types): add privy wallet types #6

refactor(posthog-types): add privy wallet types

refactor(posthog-types): add privy wallet types #6

Workflow file for this run

name: posthog-types
on:
push:
branches: [master]
pull_request:
branches: [master]
defaults:
run:
shell: bash
working-directory: .
jobs:
build:
runs-on: ubicloud
timeout-minutes: 10
defaults:
run:
working-directory: ./posthog-types
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '24.x.x'
registry-url: 'https://registry.npmjs.org'
- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.15
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
check-for-posthog-types-changes:
runs-on: ubicloud
outputs:
posthog-types: ${{ steps.filter.outputs.posthog-types }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
posthog-types:
- 'posthog-types/**'
release:
runs-on: ubicloud
needs: [build, check-for-posthog-types-changes]
if: ${{ github.ref == 'refs/heads/master' && needs.check-for-posthog-types-changes.outputs.posthog-types == 'true' }}
defaults:
run:
working-directory: ./posthog-types
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '24.x.x'
registry-url: 'https://registry.npmjs.org'
- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.2.15
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
- name: Update package version
run: |
VERSION=$(node -e "console.log(require('./package.json').version);")
npm version patch
echo "PACKAGE_VERSION=$(node -e "console.log(require('./package.json').version);")" >> $GITHUB_ENV
- name: Git commit
id: git-commit
run: |
git config user.name "GitHub Actions"
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add ..
git commit -a -m "posthog-types: release v$PACKAGE_VERSION [skip ci]"
git pull --rebase origin master
git push origin HEAD || {
echo "Push failed. Retrying after pulling latest changes..."
git pull --rebase origin master
git push origin HEAD
}
echo "version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
- name: Publish to npm
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Notify Slack on failure
if: failure()
uses: slackapi/[email protected]
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: '#code-review'
slack-message: '<!here> ❌ posthog-types deployment failed! Check the logs: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'