forked from datarobot-oss/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (115 loc) · 3.68 KB
/
Copy pathrelease.yaml
File metadata and controls
121 lines (115 loc) · 3.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Release
on:
push:
tags:
- 'v*.*.*'
- 'v*.*.*.*'
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25.7'
- name: Run goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAPS_SSH_KEY: ${{ secrets.HOMEBREW_TAPS_SSH_KEY }}
MACOS_SIGN_P12: ${{ secrets.MACOS_SIGN_P12 }}
MACOS_SIGN_PASSWORD: ${{ secrets.MACOS_SIGN_PASSWORD }}
MACOS_NOTARY_ISSUER_ID: ${{ secrets.MACOS_NOTARY_ISSUER_ID }}
MACOS_NOTARY_KEY_ID: ${{ secrets.MACOS_NOTARY_KEY_ID }}
MACOS_NOTARY_KEY: ${{ secrets.MACOS_NOTARY_KEY }}
- name: Notify Slack on Success
if: success()
uses: slackapi/slack-github-action@v1.27.0
with:
payload: |
{
"text": "✅ New DR CLI Release Published!",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "✅ New DR CLI Release Published!"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Version:*\n${{ github.ref_name }}"
},
{
"type": "mrkdwn",
"text": "*Repository:*\n<${{ github.event.repository.html_url }}|${{ github.repository }}>"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.event.repository.html_url }}/releases/tag/${{ github.ref_name }}|View Release Notes>"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Notify Slack on Failure
if: failure()
uses: slackapi/slack-github-action@v1.27.0
with:
payload: |
{
"text": "❌ DR CLI Release Failed",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "❌ DR CLI Release Failed"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Version:*\n${{ github.ref_name }}"
},
{
"type": "mrkdwn",
"text": "*Repository:*\n<${{ github.event.repository.html_url }}|${{ github.repository }}>"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}|View Workflow Run>"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK