thunkable / slack-release-notifications

GitHub action to send slack notifications on pull request events
MIT License
0 stars 0 forks source link

Is it a release or pr notification? #115

Open eburnette opened 3 months ago

eburnette commented 3 months ago

The readme says it sends notifications when "a pull request event occurs." But the name of the application is "GitHub Release Notification". I'm looking for an easy way to get notifications on new releases so I'm a little confused (I don't do new releases on pull requests fwiw).

duckdum commented 3 months ago

@eburnette , thank you for reaching out. The current action is designed to send notifications for pull request events only (opened, synchronized, closed).

Before creating a new release, you likely create a pull request targeting your main branch. At Thunkable, our release branches are prefixed with release/. We want notifications when:

A new release branch is created, listing the commits. A new commit is added to the release branch (e.g., for fixing a regression found by QA). The release branch is merged into the main branch. Here's an example configuration:

on:
  pull_request:
    types: [opened, synchronize, closed]

jobs:
  notify:
    if: startsWith(github.event.pull_request.head.ref, 'release/')
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Run Slack notification action
        uses: thunkable/slack-release-notifications@v1.0.0
        with:
          slack-token: ${{ secrets.SLACK_BOT_TOKEN }}
          github-token: ${{ secrets.GITHUB_TOKEN }}
          slack-channel: 'SLACK_CHANNEL_ID'

Please describe your current workflow, and we can explore adapting the action for release events if needed.

eburnette commented 3 months ago

I create a github release every time there is a commit to the main branch so I'd like a slack notification that points people to the release page where they can download the artifacts.