diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85c3e399f..8819ac368 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,6 +70,8 @@ jobs: needs: build runs-on: ubuntu-latest environment: release + permissions: + contents: write # grants permission to create a release on github steps: - uses: actions/checkout@v4 @@ -103,12 +105,12 @@ jobs: method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }} payload: | - username: ${{ job.status == 'success' && format('Released <{0}|{1}>', steps.github-release.outputs.url, github.ref_name) || format('Failed to release {0}', github.ref_name) }} + username: ${{ job.status == 'success' && format('Released {0}', github.ref_name) || format('Failed to release {0}', github.ref_name) }} channel: "#release" icon_emoji: "${{ job.status == 'success' && ':white_check_mark:' || ':x:' }}" text: | Actor: `${{ github.triggering_actor }}` Author: `${{ github.event.head_commit.author.username }}` - ${{ format('Commit: <{0}/{1}/commit/{2}|{1}@{2[:7]}>', github.server_url, github.repository, github.sha) || ''}} + ${{ format('Commit: <{0}/{1}/commit/{2}|{1}@{2}>', github.server_url, github.repository, github.sha) || ''}} ${{ format('Description: `{0}`', github.event.head_commit.message) || ''}} View <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|GHA logs>