-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.51 KB
/
changelog.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
name: Changelog Check
on:
# Trigger this workflow on push (merge) events,
# but ignore the main branch
push:
branches-ignore:
- main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: "[Git] Checkout code"
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "[Setup] Open /usr/local/bin Permissions"
run: sudo chmod -R a+rwx /usr/local/bin
- name: "[Setup] Cache Dependencies"
id: cache
uses: actions/cache@v2
with:
path: |
/usr/local/bin/git-cl
key: ${{ runner.os }}-release
restore-keys: |
${{ runner.os }}-release
- name: "[Changelog] Install build tools"
uses: fwal/setup-swift@v1
if: steps.cache.outputs.cache-hit != 'true'
with:
swift-version: "5.2"
- name: "[Changelog] Install git-ci"
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd /tmp/
git clone https://github.com/uptech/git-cl.git git-cl
cd ./git-cl
make -j$(nproc)
sudo make install
sudo chmod a+rwx /usr/local/bin/git-cl
cd ${GITHUB_WORKSPACE}
- name: "[Changelog] Fail if no changelog entries"
run: |
# echo output for debugging
git cl unreleased | tail -n +4 | xargs
# test output and fail step if empty
[ "$(git cl unreleased | tail -n +4 | xargs)" ] || exit 1