-
-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (48 loc) · 1.49 KB
/
main.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install Dependencies
run: |
npm install
- name: Build Library
run: |
npm run build
- name: Package Library for npm
run: |
npm pack
- uses: actions/upload-artifact@v3
with:
name: openfl-npm
path: openfl-*.tgz
if-no-files-found: error
- name: Run Tests
run: |
npm test
- name: Build docs
run: |
npm run build-docs
- name: Notify Discord (success)
if: ${{ github.repository == 'openfl/openfl-js' && github.event_name != 'pull_request' }}
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#00C07F"
message: "https://github.com/openfl/openfl-js/actions\nUnit tests succeeded."
- name: Notify Discord (failure)
uses: appleboy/discord-action@master
if: ${{ failure() && github.repository == 'openfl/openfl-js' && github.event_name != 'pull_request' }}
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#FF6562"
message: "https://github.com/openfl/openfl-js/actions\nUnit tests failed."