forked from alphacep/node-ffi-napi
-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (58 loc) · 1.75 KB
/
deploy.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
name: Deploy
on:
push:
tags: [v*]
workflow_dispatch:
jobs:
deploy:
strategy:
matrix:
config: [
{
os: windows-latest,
os_name: win,
platform: x86,
prebuild_arch: ia32,
prebuild_dir: win32-ia32,
},
{
os: windows-latest,
os_name: win,
platform: x64,
prebuild_arch: x64,
prebuild_dir: win32-x64,
},
]
node_version: [16]
runs-on: ${{ matrix.config.os }}
env:
ARCHIVE_NAME: ${{ github.ref_name }}-${{ matrix.config.os_name }}-${{ matrix.config.platform }}.zip
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies (Windows only)
if: startsWith(matrix.config.os, 'windows')
run: |
choco install visualstudio2017-workload-vctools -y
npm config set msvs_version 2017
- name: Install npm packages
run: npm install --build-from-source --no-package-lock
- name: Build
env:
PREBUILD_ARCH: ${{ matrix.config.prebuild_arch }}
run: |
npm run prebuild --v8_enable_pointer_compression=false --v8_enable_31bit_smis_on_64bit_arch=false
cd prebuilds
7z a "${{ env.ARCHIVE_NAME }}" "${{ matrix.config.prebuild_dir }}"
- name: Deploy
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "prebuilds/${{ env.ARCHIVE_NAME }}"
draft: false
prerelease: true
token: ${{ secrets.PREBUILD_GITHUB_TOKEN }}