You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

release.yml 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Release
  2. # This workflow is triggered when publishing a GitHub release
  3. on:
  4. release:
  5. types:
  6. - published
  7. jobs:
  8. release:
  9. runs-on: ubuntu-latest
  10. name: Start release process
  11. steps:
  12. # Not sure why this is needed... Fixes issue with running the action.
  13. - name: Checkout release action
  14. uses: actions/checkout@v2
  15. with:
  16. repository: SonarSource/gh-action_LT_release
  17. - name: Run release action
  18. id: run_release
  19. uses: SonarSource/gh-action_LT_release@master
  20. env:
  21. GITHUB_TOKEN: ${{ secrets.GITHUB_ORG_TOKEN }}
  22. - name: Log outputs
  23. if: always()
  24. run: |
  25. echo "${{ steps.run_release.outputs.releasability }}"
  26. echo "${{ steps.run_release.outputs.release }}"
  27. - name: Notify success on Slack
  28. uses: Ilshidur/action-slack@2.0.0
  29. env:
  30. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
  31. with:
  32. args: "Release successful for {{ GITHUB_REPOSITORY }} by {{ GITHUB_ACTOR }}"
  33. - name: Notify failures on Slack
  34. uses: Ilshidur/action-slack@2.0.0
  35. if: failure()
  36. env:
  37. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
  38. with:
  39. args: "Release failed, see the logs at https://github.com/{{ GITHUB_REPOSITORY }}/actions by {{ GITHUB_ACTOR }}"