Add missing permissions to actions publish

This commit adds the missing permissions to the
actions publish script. The 'contents: write'
permission is required to publish releases and
the 'pull-requests: write' permission is required
to close the pull request after the changes are committed.
This commit is contained in:
Jameel Kaisar 2023-10-08 22:13:59 +00:00
parent 61c030b08f
commit 2779b8ea7f

View File

@ -141,14 +141,6 @@ module Homebrew
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
run: git push --delete origin $BRANCH
- name: Close pr
if: github.event.pull_request.head.repo.fork == false
env:
GITHUB_TOKEN: ${{ github.token }}
PULL_REQUEST: ${{ github.event.pull_request.number }}
REPO: ${{ github.repository }}
run: gh pr close $PULL_REQUEST --repo $REPO
YAML
(tap.path/".github/workflows").mkpath