:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(desktop): notify Discord after publishing release feed (#81076)
Alessandro Pogliaghi96bb6f01f5f8
diff --git a/.github/workflows/desktop-discord-release.yml b/.github/workflows/desktop-discord-release.ymldeleted file mode 100644index 7e678ff9a520..000000000000--- a/.github/workflows/desktop-discord-release.yml+++ /dev/null@@ -1,18 +0,0 @@-name: Desktop Release to Discord--on:- release:- types: [published]--permissions: {}--jobs:- notify:- if: startsWith(github.event.release.tag_name, 'desktop-v')- runs-on: ubuntu-latest- timeout-minutes: 5- steps:- - name: Publish release notes to Discord- uses: SethCohen/github-releases-to-discord@37afa88c8c9302a9307244b5a0d4e782d528a4b5 # v1.15.1- with:- webhook_url: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.ymlindex 0d44ca7ad9dc..ad560644045a 100644--- a/.github/workflows/desktop-release.yml+++ b/.github/workflows/desktop-release.yml@@ -820,3 +820,28 @@ jobs:echo "| \`$f\` | $BASE/$f |"done} >> "$GITHUB_STEP_SUMMARY"++ # Notify only after the S3 channel files have been published. Those files,+ # rather than the GitHub release event, are the desktop release boundary.+ - name: Publish release notes to Discord+ env:+ APP_VERSION: ${{ steps.version.outputs.version }}+ DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_DESKTOP_RELEASES_WEBHOOK_URL }}+ run: |+ if [[ -z "$DISCORD_WEBHOOK_URL" ]]; then+ echo "::error::DISCORD_DESKTOP_RELEASES_WEBHOOK_URL is not configured"+ exit 1+ fi++ DESCRIPTION=$(python3 -c "content = open('/tmp/release-notes.md', encoding='utf-8').read(); print(content[:4000], end='')")+ jq -n \+ --arg title "PostHog Code v$APP_VERSION" \+ --arg url "https://github.com/$GITHUB_REPOSITORY/releases/tag/desktop-v$APP_VERSION" \+ --arg description "$DESCRIPTION" \+ '{embeds: [{title: $title, url: $url, description: $description, color: 2105893}]}' \+ > /tmp/discord-release.json++ curl --fail-with-body \+ -H "Content-Type: application/json" \+ --data-binary @/tmp/discord-release.json \+ "$DISCORD_WEBHOOK_URL"