-
Notifications
You must be signed in to change notification settings - Fork 92
91 lines (84 loc) · 2.91 KB
/
create-github-release.yaml
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
name: "Create Github Release"
# NOTE: This workflow only works well when triggered by a tag push due to
# unexpected behavior in action-automatic-releases when manually setting an
# automatic_release_tag.
# To manually trigger this, you can force push a version tag starting with `v`.
on:
push:
tags:
- "v*"
jobs:
create-release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'release skip')"
steps:
- uses: "marvinpinto/[email protected]"
with:
repo_token: "${{ secrets.BUILDBUDDY_GITHUB_USER_TOKEN }}"
prerelease: false
draft: true
build-linux-artifacts:
uses: ./.github/workflows/build-linux-github-release-artifacts.yaml
if: "!contains(github.event.head_commit.message, 'release skip')"
needs: create-release
with:
release_branch: ${{ github.ref }}
version_tag: ${{ github.ref_name }}
secrets: inherit
build-mac-intel-artifacts:
uses: ./.github/workflows/build-mac-intel-github-release-artifacts.yaml
if: "!contains(github.event.head_commit.message, 'release skip')"
needs: create-release
with:
release_branch: ${{ github.ref }}
version_tag: ${{ github.ref_name }}
secrets: inherit
build-mac-m1-artifacts:
uses: ./.github/workflows/build-mac-m1-github-release-artifacts.yaml
if: "!contains(github.event.head_commit.message, 'release skip')"
needs: create-release
with:
release_branch: ${{ github.ref }}
version_tag: ${{ github.ref_name }}
secrets: inherit
build-windows-artifacts:
uses: ./.github/workflows/build-windows-github-release-artifacts.yaml
if: "!contains(github.event.head_commit.message, 'release skip')"
needs: create-release
with:
release_branch: ${{ github.ref }}
version_tag: ${{ github.ref_name }}
secrets: inherit
slack_on_failure:
runs-on: ubuntu-latest
needs: [create-release, build-linux-artifacts, build-mac-intel-artifacts, build-mac-m1-artifacts]
if: ${{ always() && contains(needs.*.result, 'failure') }}
steps:
- name: Slack
uses: 8398a7/action-slack@v3
with:
status: custom
custom_payload: |
{
attachments: [{
color: '#ad1411',
blocks: [
{
type: 'section',
text: {
type: 'mrkdwn',
text: '*Creating Github Release Failed*'
}
},
{
type: 'section',
text: {
type: 'mrkdwn',
text: `https://github.com/buildbuddy-io/buildbuddy/actions/runs/${{ github.run_id }}`
}
}
]
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_AUTO_RELEASE_WEBHOOK_URL }}