diff --git a/.github/post_merge_labeler.yml b/.github/post_merge_labeler.yml new file mode 100644 index 000000000000..c02eb411773e --- /dev/null +++ b/.github/post_merge_labeler.yml @@ -0,0 +1,2 @@ +'needs-publishing': + - packages/*/** diff --git a/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml index 5016184d6d11..7b048d33e669 100644 --- a/.github/workflows/pull_request_label.yml +++ b/.github/workflows/pull_request_label.yml @@ -1,20 +1,31 @@ # This workflow applies labels to pull requests based on the # paths that are modified in the pull request. # -# Edit `.github/labeler.yml` to configure labels. +# Edit `.github/labeler.yml` and `.github/post_merge_labeler.yml` +# to configure labels. # # For more information, see: https://github.com/actions/labeler name: Pull Request Labeler on: - - pull_request_target + pull_request_target: + types: [opened, synchronize, reopened, closed] jobs: label: runs-on: ubuntu-latest steps: - - uses: actions/labeler@main - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - sync-labels: true + - uses: actions/labeler@v3 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true + + post_merge_label: + if: github.event.action == 'closed' && github.event.pull_request.merged == true + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v3 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/post_merge_labeler.yml