forked from noble/noble
-
Notifications
You must be signed in to change notification settings - Fork 159
68 lines (66 loc) · 1.75 KB
/
prebuild.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: prebuild
on:
push:
branches:
- master
tags:
- '*'
pull_request:
branches:
- master
workflow_dispatch:
jobs:
prebuild:
strategy:
matrix:
include:
- name: darwin
os: macos-11
node: x64
- name: linux
os: ubuntu-latest
- name: win32
os: windows-2019
name: Build ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- if: matrix.node
uses: actions/setup-node@v3
with:
node-version: 14.x
architecture: ${{ matrix.node }}
- uses: actions/setup-python@v2
with:
python-version: '3.10'
- uses: actions/checkout@v3
- name: Install dependencies (ubuntu-latest)
# Use g++-9 only on versions after 'ubuntu-18.04'
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt -qq update
sudo apt install -y g++-9
export CC="g++-9"
- run: npm install --ignore-scripts
- run: npm run prebuild-${{ matrix.name }}
- run: tar -zcvf ${{ matrix.name }}.tar.gz -C prebuilds .
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.name }}
path: ${{ matrix.name }}.tar.gz
retention-days: 1
release:
needs: prebuild
name: Release
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v2
with:
path: artifacts
- uses: docker://antonyurchenko/git-release:v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: artifacts/*/*.tar.gz