-
Notifications
You must be signed in to change notification settings - Fork 1
114 lines (111 loc) · 3.11 KB
/
build.yml
File metadata and controls
114 lines (111 loc) · 3.11 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test_linux:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 15.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
- run: npm i -g
- run: fileutils help
test_macos:
runs-on: macos-latest
strategy:
matrix:
node-version: [14.x, 15.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
- run: npm i -g
- run: fileutils help
test_windows:
runs-on: windows-latest
strategy:
matrix:
node-version: [14.x, 15.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
working-directory: ${{ github.workspace }}
- run: npm i -g
- run: fileutils help
build_windows:
needs: test_windows
runs-on: windows-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm i -g pkg
- run: npm run-script build-win --if-present
- run: dir build\bin\
- run: npm run-script package-win --if-present
- run: dir build\chocolatey\fileutils-cli\tools\
- name: Choco package
uses: crazy-max/ghaction-chocolatey@v1
with:
args: pack build\chocolatey\fileutils-cli\fileutils-cli.nuspec
- uses: actions/upload-artifact@v2
with:
name: exe
path: build\bin\*.exe
- run: dir
- uses: actions/upload-artifact@v2
with:
name: nupkg
path: "*.nupkg"
build_unix:
needs: test_linux
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm pack
- run: npm i -g pkg
- run: npm run-script build --if-present
- run: npm run-script package-mac --if-present
- uses: actions/upload-artifact@v2
with:
name: unix-binaries
path: /home/runner/work/node-fileutils-cli/node-fileutils-cli/bin
- uses: actions/upload-artifact@v2
with:
name: homebrew-ruby
path: build/homebrew/fileutils-cli.rb