notify.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # Get releases:
  2. # curl -XGET -u "username:access-token" -H "Accept: application/vnd.github.everest-preview+json" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/sequelize/sequelize/releases
  3. # Trigger manually:
  4. # curl -XPOST -u "username:access-token" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/sequelize/sequelize/dispatches --data '{"event_type":"Release notifier","client_payload":{"release-id": release-id}}'
  5. name: Notify release channels
  6. on: repository_dispatch
  7. jobs:
  8. tweet:
  9. name: Tweet release
  10. runs-on: ubuntu-latest
  11. steps:
  12. - uses: cardinalby/git-get-release-action@319798e20e923b75a49d335f1afdaf6f18422118 # v1.1
  13. id: releaseInfo
  14. env:
  15. GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
  16. with:
  17. releaseId: ${{ github.event.client_payload.release-id }}
  18. - uses: ethomson/send-tweet-action@288f9339e0412e3038dce350e0da5ecdf12133a6 # v1.0.0
  19. with:
  20. status: 'We have just released ${{ steps.releaseInfo.outputs.name }} of Sequelize. https://github.com/sequelize/sequelize/releases/tag/${{ steps.releaseInfo.outputs.name }}'
  21. consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
  22. consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
  23. access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
  24. access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
  25. notify-opencollective:
  26. name: Notify OpenCollective
  27. runs-on: ubuntu-latest
  28. steps:
  29. - uses: sequelize/proxy-release-to-open-collective@d8edaf56f12f51518fb97829b699a2e2e6d8166e # main
  30. with:
  31. releaseId: ${{ github.event.client_payload.release-id }}
  32. projectSlug: sequelize/sequelize
  33. ocSlug: sequelize
  34. ocApiKey: ${{ secrets.OPEN_COLLECTIVE_KEY }}
  35. githubToken: ${{ secrets.GH_TOKEN }}