-
Notifications
You must be signed in to change notification settings - Fork 3
89 lines (73 loc) · 2.01 KB
/
node.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
name: MC Docu CI
on:
push:
branches:
- master
paths-ignore:
- '**.md'
- '**.spec.js'
- '.idea/**'
- '.vscode/**'
- '.dockerignore'
- 'Dockerfile'
- '.gitignore'
- '.github/**'
- '!.github/workflows/build.yml'
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 360
strategy:
fail-fast: true
max-parallel: 4
matrix:
version: ['latest']
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
cache: 'npm'
- name: Install Dependencies
run: npm install --force
- name: Build Release Files
run: npm run build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Tests
run: npm test
- name: Electronegativity
uses: doyensec/[email protected]
- name: Build for Windows
if: matrix.os == 'windows-latest'
run: npm run build:win
- name: Build for macOS
if: matrix.os == 'macos-latest'
run: npm run build:mac
- name: Build for Linux
if: matrix.os == 'ubuntu-latest'
run: npm run build:linux
- name: List Release Files (Linux & macOS)
if: runner.os != 'Windows'
run: ls -la dist/
- name: List Release Files (Windows)
if: runner.os == 'Windows'
run: dir dist
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: release_on_${{ matrix.os }}_node_${{ matrix.version }}
path: dist/
retention-days: 62
if-no-files-found: warn
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: release_on_${{ matrix.os }}_node_${{ matrix.version }}
path: dist/