forked from Drakkar-Software/OctoBot
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (62 loc) · 1.73 KB
/
release.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: "OctoBot-Release"
on:
push:
tags:
- '*'
jobs:
release-jobs:
name: Create release jobs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set Environment Variables
run: |
echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Create release on OctoBot-Tentacles
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Version - ${{ env.VERSION }}
draft: false
prerelease: false
commitish: master
repo: OctoBot-Tentacles
# TODO uncomment when adding tests to OctoBot-Binary
# - name: Wait for tentacles build done
# uses: fountainhead/action-wait-for-check@v1.0.0
# id: wait-for-build
# with:
# token: ${{ secrets.AUTH_TOKEN }}
# checkName: "Done"
# ref: ${{ github.sha }}
# timeoutSeconds: 3600
#
# - name: Trigger fail when Main failed
# if: steps.wait-for-build.outputs.conclusion == 'failure'
# run: exit 1
- name: Create release on OctoBot-Binary
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.AUTH_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Version - ${{ env.VERSION }}
draft: false
prerelease: false
commitish: master
repo: OctoBot-Binary
notify:
name: Notify
runs-on: ubuntu-latest
needs:
- release-jobs
if: ${{ failure() }}
steps:
- name: Notify discord
uses: sarisia/actions-status-discord@v1
with:
status: Failure
webhook: ${{ secrets.DISCORD_GITHUB_WEBHOOK }}