name: Third-Party Integrations on: release: types: [published] workflow_dispatch: inputs: service: description: 'Which integration to run' required: true default: 'all' type: choice options: [all, huggingface, notion, slack, linear, sentry] jobs: notify-slack: runs-on: ubuntu-latest if: github.event_name == 'release' || inputs.service == 'all' || inputs.service == 'slack' steps: - name: Notify Slack on release env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} run: | if [ -z "$SLACK_WEBHOOK_URL" ]; then echo "⚠ SLACK_WEBHOOK_URL not set — skipping Slack notification" exit 0 fi curl -s -X POST "$SLACK_WEBHOOK_URL" \ -H 'Content-type: application/json' \ -d "{ \"text\": \"🚀 *${{ github.repository }}* released \`${{ github.ref_name }}\`\", \"attachments\": [{ \"color\": \"#FF1D6C\", \"fields\": [ {\"title\": \"Repo\", \"value\": \"${{ github.repository }}\", \"short\": true}, {\"title\": \"Tag\", \"value\": \"${{ github.ref_name }}\", \"short\": true}, {\"title\": \"Release\", \"value\": \"${{ github.event.release.html_url }}\", \"short\": false} ] }] }" echo "✓ Slack notified" create-linear-release: runs-on: ubuntu-latest if: github.event_name == 'release' || inputs.service == 'linear' steps: - name: Create Linear release milestone env: LINEAR_API_KEY: ${{ secrets.LINEAR_API_KEY }} LINEAR_TEAM_ID: ${{ secrets.LINEAR_TEAM_ID }} run: | if [ -z "$LINEAR_API_KEY" ] || [ -z "$LINEAR_TEAM_ID" ]; then echo "⚠ LINEAR_API_KEY or LINEAR_TEAM_ID not set" exit 0 fi curl -s -X POST "https://api.linear.app/graphql" \ -H "Authorization: $LINEAR_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"query\": \"mutation { milestoneCreate(input: { name: \\\"${{ github.ref_name }}\\\", teamId: \\\"$LINEAR_TEAM_ID\\\" }) { milestone { id name } } }\"}" \ | python3 -c "import sys,json; d=json.load(sys.stdin); print('✓ Linear milestone:', d.get('data',{}).get('milestoneCreate',{}).get('milestone',{}).get('name','?'))" update-sentry-release: runs-on: ubuntu-latest if: github.event_name == 'release' || inputs.service == 'sentry' steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Create Sentry release uses: getsentry/action-release@v1 env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG: ${{ secrets.SENTRY_ORG || 'blackroad-os' }} SENTRY_PROJECT: ${{ github.event.repository.name }} with: environment: production version: ${{ github.ref_name }} continue-on-error: true