-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.29 KB
/
build.yml
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
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: build
run: |
swift build
swift test
build_succeeded_notify:
runs-on: ubuntu-latest
needs: build
if: ${{ success() }}
steps:
- name: build has succceeded
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: dev-builds
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: '#FFA500'
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
SLACK_MESSAGE: Build succeeded on this repository
SLACK_TITLE: ${{ github.event.repository.name }}
build_failed_notify:
runs-on: ubuntu-latest
needs: build
if: ${{ failure() }}
steps:
- name: build has failed
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: dev-builds
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: '#FF0000'
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
SLACK_MESSAGE: Build failed on this repository
SLACK_TITLE: ${{ github.event.repository.name }}