-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (53 loc) · 1.84 KB
/
release.yml
File metadata and controls
59 lines (53 loc) · 1.84 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
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '3*'
name: create_release
jobs:
build:
name: create_release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Slack Notification on Start
uses: rtCamp/action-slack-notify@v2.2.0
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }}
SLACK_CHANNEL: notify-nc3-release
SLACK_TITLE: "${{ github.repository }}"
SLACK_COLOR: "#f0ad4e"
SLACK_MESSAGE: "Start Job"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: |
NetCommons ${{ github.ref }} released.
draft: false
prerelease: false
# テスト成功時はこちらのステップが実行される
- name: Slack Notification on Finish
uses: rtCamp/action-slack-notify@v2.2.0
if: success()
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }}
SLACK_CHANNEL: notify-nc3-release
SLACK_TITLE: "${{ github.repository }}"
SLACK_COLOR: good
SLACK_MESSAGE: "Job Success"
# テスト失敗時はこちらのステップが実行される
- name: Slack Notification on Failure
uses: rtCamp/action-slack-notify@v2.2.0
if: failure()
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_RELEASE }}
SLACK_CHANNEL: notify-nc3-tests
SLACK_TITLE: "${{ github.repository }}"
SLACK_COLOR: danger
SLACK_MESSAGE: "Job Failure"