release.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Release Drafter
  2. on:
  3. push:
  4. # branches to consider in the event; optional, defaults to all
  5. branches:
  6. - main
  7. # pull_request event is required only for autolabeler
  8. pull_request:
  9. # Only following types are handled by the action, but one can default to all as well
  10. types: [opened, reopened, synchronize]
  11. # pull_request_target event is required for autolabeler to support PRs from forks
  12. # pull_request_target:
  13. # types: [opened, reopened, synchronize]
  14. permissions:
  15. contents: read
  16. jobs:
  17. update_release_draft:
  18. permissions:
  19. contents: write # for release-drafter/release-drafter to create a github release
  20. pull-requests: write # for release-drafter/release-drafter to add label to PR
  21. runs-on: ubuntu-latest
  22. steps:
  23. # (Optional) GitHub Enterprise requires GHE_HOST variable set
  24. #- name: Set GHE_HOST
  25. # run: |
  26. # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
  27. # Drafts your next Release notes as Pull Requests are merged into "master"
  28. - uses: release-drafter/release-drafter@v5
  29. # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
  30. # with:
  31. # config-name: my-config.yml
  32. # disable-autolabeler: true
  33. env:
  34. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}