From 6ca32eb7b5dbd118d4b69c2782b93da2a037004a Mon Sep 17 00:00:00 2001 From: solidsnakedev Date: Sat, 24 Jan 2026 16:32:05 -0700 Subject: [PATCH] use workflow_run trigger for X notifications --- .github/workflows/post-release-to-x.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/post-release-to-x.yml b/.github/workflows/post-release-to-x.yml index 8fbf001..86acf67 100644 --- a/.github/workflows/post-release-to-x.yml +++ b/.github/workflows/post-release-to-x.yml @@ -1,20 +1,31 @@ name: Post Release to X on: - release: - types: [published] + workflow_run: + workflows: ["Release"] + types: [completed] workflow_dispatch: jobs: notify: runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: + - name: Get latest release + id: release + run: | + RELEASE=$(gh api /repos/${{ github.repository }}/releases/latest) + echo "tag=$(echo $RELEASE | jq -r .tag_name)" >> $GITHUB_OUTPUT + echo "url=$(echo $RELEASE | jq -r .html_url)" >> $GITHUB_OUTPUT + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Tweet new release uses: nearform-actions/github-action-notify-twitter@v1 with: message: | - Evolution SDK ${{ github.event.release.tag_name }} out now - ${{ github.event.release.html_url }} + Evolution SDK ${{ steps.release.outputs.tag }} out now + ${{ steps.release.outputs.url }} Happy building! 🛠️ twitter-app-key: ${{ secrets.TWITTER_API_KEY }} twitter-app-secret: ${{ secrets.TWITTER_API_SECRET }}