-
-
Notifications
You must be signed in to change notification settings - Fork 169
81 lines (79 loc) · 2.09 KB
/
pkg.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
name: "Package Node.js project into an executable"
on:
push:
branches:
- main
- pkg
paths:
- "lib/**"
- "*.js"
- "*.json"
- ".github/workflows/pkg.yml"
- "script/build/pkg.sh"
workflow_dispatch:
jobs:
x64:
runs-on: ubuntu-latest
name: node${{ matrix.nodev }}-${{ matrix.platform }}-x64
strategy:
matrix:
include:
- platform: linux
nodev: 18
- platform: macos
nodev: 18
- platform: win
nodev: 18
# - platform: win
# nodev: 12
steps:
- name: "Checkout codes"
uses: actions/checkout@v4
- name: "Use Node.js"
uses: actions/setup-node@v4
with:
node-version: "*"
- name: "Pkg this"
run: |
npm run pkg "node${{ matrix.nodev }}-${{ matrix.platform }}-x64"
- name: "Upload to artifact"
uses: actions/upload-artifact@v4
with:
name: node${{ matrix.nodev }}-${{ matrix.platform }}-x64
path: "dist/*.zip"
- name: "Upload to release draft"
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
file: "dist/*.zip"
tag_name: "v2"
overwrite: true
arm64:
runs-on: ubuntu-latest
name: node18-${{ matrix.platform }}-arm64
strategy:
matrix:
include:
- platform: linux
- platform: linuxstatic
- platform: alpine
steps:
- name: "Checkout codes"
uses: actions/checkout@v4
- name: "Pkg this"
run: |
npm run pkg "node18-${{ matrix.platform }}-arm64"
- name: "Upload to artifact"
uses: actions/upload-artifact@v4
with:
name: node18-${{ matrix.platform }}-arm64
path: "dist/*.zip"
- name: "Upload to release draft"
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
file: "dist/*.zip"
tag_name: "v2"
overwrite: true