Skip to content

Commit

Permalink
fix: edit update (pre)release title on success/failure (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigilioso committed Apr 15, 2024
1 parent 06dbd25 commit d793771
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ jobs:
GENERATE_PACKAGES: true
UPLOAD_PACKAGES: ${{ github.event.release.prerelease }}

- if: ${{ github.event.release.prerelease }}
uses: actions/checkout@v4
- if: ${{ github.event.release.prerelease }}
name: Update title for successful pre-release
env:
GH_TOKEN: "${{ secrets.COREINT_BOT_TOKEN }}"
run: |
gh release edit ${{ github.event.release.tag_name }} --title "${{ github.event.release.tag_name }}"
notify-failure:
if: ${{ always() && failure() }}
needs: [test-nix, test-windows, integration-release]
Expand All @@ -93,3 +103,22 @@ jobs:
slack-bot-user-oauth-access-token: ${{ secrets.COREINT_SLACK_TOKEN }}
slack-channel: ${{ secrets.COREINT_SLACK_CHANNEL }}
slack-text: "❌ `${{ env.ORIGINAL_REPO_NAME }}`: [release pipeline failed](${{ github.server_url }}/${{ env.ORIGINAL_REPO_NAME }}/actions/runs/${{ github.run_id }})."

update-release-title-on-failure:
if: ${{ always() && failure() }}
needs: [test-nix, test-windows, integration-release]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- if: ${{ github.event.release.prerelease }}
name: Reflect failure in pre-release title
env:
GH_TOKEN: "${{ secrets.COREINT_BOT_TOKEN }}"
run: |
gh release edit ${{ github.event.release.tag_name }} --title "${{ github.event.release.tag_name }} (pre-release-failure)"
- if: ${{ ! github.event.release.prerelease }}
name: Reflect failure in release title
env:
GH_TOKEN: "${{ secrets.COREINT_BOT_TOKEN }}"
run: |
gh release edit ${{ github.event.release.tag_name }} --title "${{ github.event.release.tag_name }} (release-failure)"

0 comments on commit d793771

Please sign in to comment.