release-on-milestone-closed.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Alternate workflow example.
  2. # This one is identical to the one in release-on-milestone.yml, with one change:
  3. # the Release step uses the ORGANIZATION_ADMIN_TOKEN instead, to allow it to
  4. # trigger a release workflow event. This is useful if you have other actions
  5. # that intercept that event.
  6. name: "Automatic Releases"
  7. on:
  8. milestone:
  9. types:
  10. - "closed"
  11. jobs:
  12. release:
  13. name: "GIT tag, release & create merge-up PR"
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: "Checkout"
  17. uses: "actions/checkout@v2"
  18. - name: "Release"
  19. uses: "laminas/automatic-releases@v1"
  20. with:
  21. command-name: "laminas:automatic-releases:release"
  22. env:
  23. "GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
  24. "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
  25. "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
  26. "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
  27. - name: "Create Merge-Up Pull Request"
  28. uses: "laminas/automatic-releases@v1"
  29. with:
  30. command-name: "laminas:automatic-releases:create-merge-up-pull-request"
  31. env:
  32. "GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
  33. "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
  34. "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
  35. "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
  36. - name: "Create and/or Switch to new Release Branch"
  37. uses: "laminas/automatic-releases@v1"
  38. with:
  39. command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
  40. env:
  41. "GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
  42. "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
  43. "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
  44. "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
  45. - name: "Create new milestones"
  46. uses: "laminas/automatic-releases@v1"
  47. with:
  48. command-name: "laminas:automatic-releases:create-milestones"
  49. env:
  50. "GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
  51. "SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
  52. "GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
  53. "GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}