-
Notifications
You must be signed in to change notification settings - Fork 26
120 lines (109 loc) · 3.2 KB
/
build_nodejs.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
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
115
116
117
118
119
120
name: build nodejs (deprecated)
on:
workflow_dispatch:
inputs:
tag_date:
description: 'tag date'
required: true
env:
VERSION: 14.16.1
jobs:
build_windows:
name: Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Run build script
continue-on-error: true
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
call .\windows_trybuild.cmd ${{env.VERSION}}
- name: Run upload script
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
call .\windows_64.cmd
- uses: actions/upload-artifact@v2
with:
name: nodejs_bin
path: puerts-node/**/*
build_windows_32:
name: Windows-32
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Run build script
continue-on-error: true
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
call .\windows_trybuild.cmd ${{env.VERSION}}
- name: Run upload script
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
call .\windows_32.cmd
- uses: actions/upload-artifact@v2
with:
name: nodejs_bin
path: puerts-node/**/*
build_macos:
name: macOS
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Use Xcode 12.0 to use SDK 10.15
run: sudo xcode-select -switch "/Applications/Xcode_12.app"
- name: Run build script
run: |
cd $GITHUB_WORKSPACE
sh ./macos.sh ${{env.VERSION}}
- uses: actions/upload-artifact@v2
with:
name: nodejs_bin
path: ~/puerts-node/**/*
build_linux:
name: linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run build script
run: |
cd $GITHUB_WORKSPACE
sh ./linux.sh ${{env.VERSION}}
- uses: actions/upload-artifact@v2
with:
name: nodejs_bin
path: ~/puerts-node/**/*
publish:
runs-on: ubuntu-latest
needs: [build_windows,build_windows_32,build_macos,build_linux]
steps:
- uses: actions/download-artifact@v1
with:
name: nodejs_bin
path: nodejs_bin/
- name: Create Release Asset
run: |
cd nodejs_bin/ && tar cvfz ../nodejs_bin_${{env.VERSION}}.tgz * && cd -
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: NodeJS_${{ github.event.inputs.tag_date }}
release_name: NodeJS_${{ github.event.inputs.tag_date }}
draft: false
prerelease: false
- name: Upload nodejs_bin
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./nodejs_bin_${{env.VERSION}}.tgz
asset_name: nodejs_bin_${{env.VERSION}}.tgz
asset_content_type: application/tgz