-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Create workflow prepare-release.yml (#1536)
* ci: Create workflow prepare-release.yml * ci: change job name * chore: remove pull_request trigger
- Loading branch information
1 parent
b7a2af6
commit d662565
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Prepare Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
prepare-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
|
||
- name: Prepare release | ||
env: | ||
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} | ||
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | ||
run: | | ||
make prepare | ||
echo "$GPG_SECRET_KEY" | base64 --decode | gpg --import --no-tty --batch --yes | ||
make release | ||
- name: Notify Slack on Failure | ||
uses: slackapi/slack-github-action@v1.25.0 | ||
if: failure() | ||
with: | ||
payload: | | ||
{ | ||
"attachments": [ | ||
{ | ||
"color": "#E92020", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "*GitHub Workflow Failure*\ngo-sdk/prepare-release\n*Workflow Run*\n https://github.com/lacework/go-sdk/actions/runs/${{ github.run_id }}\n@oncall-growth-eng! There has been a failure that needs your attention. :rotating_light:" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_GROWTH_ENG_ALERTS }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |