Skip to content

Prepare Release

Prepare Release #9

name: Prepare Release
on: workflow_dispatch
jobs:
prepare-release:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.TOKEN }}
fetch-depth: 0
ref: main
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Prepare release
shell: bash
run: |
make prepare
echo "$GPG_SECRET_KEY" | base64 --decode | gpg --import --no-tty --batch --yes
make release
env:
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
slack-notify:
name: Slack Notify if Failed Tests
needs: prepare-release
runs-on: ubuntu-latest
if: always()
steps:
- name: Notify Slack on Failure
if: ${{ contains(needs.*.result, 'failure') }}
uses: slackapi/[email protected]
with:
payload: |
{
"attachments": [
{
"color": "#E92020",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:\n*GitHub Workflow Failure <${{ github.server_url }}/${{ github.repository }}>*\n\n*Workflow Run*\n <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Workflow>"
}
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.TF_SLACK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK