Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

43 rader
1.3 KiB

  1. # This action:
  2. #
  3. # 1. Generates release notes using github API.
  4. # 2. Strips unnecessary info like chore/style etc from notes.
  5. # 3. Updates release info.
  6. # This action needs to be maintained on all branches that do releases.
  7. name: 'Release Notes'
  8. on:
  9. workflow_dispatch:
  10. inputs:
  11. tag_name:
  12. description: 'Tag of release like v13.0.0'
  13. required: true
  14. type: string
  15. release:
  16. types: [released]
  17. permissions:
  18. contents: read
  19. jobs:
  20. regen-notes:
  21. name: 'Regenerate release notes'
  22. runs-on: ubuntu-latest
  23. steps:
  24. - name: Update notes
  25. run: |
  26. NEW_NOTES=$(gh api --method POST -H "Accept: application/vnd.github+json" /repos/xhiveframework/xhiveframework/releases/generate-notes -f tag_name=$RELEASE_TAG \
  27. | jq -r '.body' \
  28. | sed -E '/^\* (chore|ci|test|docs|style)/d' \
  29. | sed -E 's/by @mergify //'
  30. )
  31. RELEASE_ID=$(gh api -H "Accept: application/vnd.github+json" /repos/xhiveframework/xhiveframework/releases/tags/$RELEASE_TAG | jq -r '.id')
  32. gh api --method PATCH -H "Accept: application/vnd.github+json" /repos/xhiveframework/xhiveframework/releases/$RELEASE_ID -f body="$NEW_NOTES"
  33. env:
  34. GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
  35. RELEASE_TAG: ${{ github.event.inputs.tag_name || github.event.release.tag_name }}