-
Notifications
You must be signed in to change notification settings - Fork 10
100 lines (91 loc) · 2.42 KB
/
i18nify-js-danger.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Danger: automating your team's conventions surrounding code review
# More info in Readme
name: Danger CI
on:
pull_request:
branches:
- master
types:
[
opened,
edited,
reopened,
synchronize,
labeled,
unlabeled,
review_requested,
review_request_removed,
]
paths:
- 'packages/i18nify-js/**'
jobs:
build-base:
name: Generate Base Build
runs-on: ubuntu-latest
steps:
- name: Checkout Codebase
uses: actions/checkout@v3
- name: Use Node v20
uses: actions/setup-node@v2
with:
node-version: 20.3.1
- name: Install Dependencies
run: yarn
- name: Make Build
run: yarn build-js
- name: Upload base stats
uses: actions/upload-artifact@v3
with:
name: base
path: |
./packages/i18nify-js/lib
!./packages/i18nify-js/lib/**/*.map
retention-days: 1
build-pr:
name: Generate PR Build
runs-on: ubuntu-latest
steps:
- name: Checkout Codebase
uses: actions/checkout@v3
- name: Use Node v20
uses: actions/setup-node@v2
with:
node-version: 20.3.1
- name: Install Dependencies
run: yarn
- name: Make Build
run: yarn build-js
- name: Upload pr build
uses: actions/upload-artifact@v3
with:
name: pr
path: |
./packages/i18nify-js/lib
!./packages/i18nify-js/lib/**/*.map
retention-days: 1
Danger:
name: Run Danger JS
runs-on: ubuntu-latest
needs: [build-base, build-pr]
env:
# As Danger uses a bot to put comments on your pr you need to
# use `secrets.CI_BOT_TOKEN` (Personal Access Token) to provide write access to bot.
DANGER_GITHUB_API_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
DANGER_DISABLE_TRANSPILATION: 'true'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout Codebase
uses: actions/checkout@v3
- name: Use Node v20
uses: actions/setup-node@v2
with:
node-version: 20.3.1
- name: Download stats
uses: actions/download-artifact@v3
with:
path: ./build
- name: Display structure of downloaded files
run: ls -R
working-directory: ./build
- name: Danger
uses: danger/[email protected]