Release notifier #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get releases: | |
# 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/cli/releases | |
# Trigger manually: | |
# 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/cli/dispatches --data '{"event_type":"Release notifier","client_payload":{"release-id": release-id}}' | |
name: Notify release channels | |
on: repository_dispatch | |
jobs: | |
tweet: | |
name: Tweet release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: cardinalby/[email protected] | |
id: releaseInfo | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
with: | |
releaseId: ${{ github.event.client_payload.release-id }} | |
- uses: ethomson/send-tweet-action@v1 | |
with: | |
status: "We have just released ${{ steps.releaseInfo.outputs.name }} of Sequelize CLI. https://github.com/sequelize/cli/releases/tag/${{ steps.releaseInfo.outputs.name }}" | |
consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }} | |
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }} | |
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }} | |
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | |
notify-opencollective: | |
name: Notify OpenCollective | |
runs-on: ubuntu-latest | |
steps: | |
- uses: sequelize/proxy-release-to-open-collective@main | |
with: | |
releaseId: ${{ github.event.client_payload.release-id }} | |
projectSlug: sequelize/cli | |
ocSlug: sequelize | |
ocApiKey: ${{ secrets.OPEN_COLLECTIVE_KEY }} | |
githubToken: ${{ secrets.GH_TOKEN }} |