-
-
Notifications
You must be signed in to change notification settings - Fork 177
77 lines (77 loc) · 2.06 KB
/
release.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
name: Release
on:
push:
tags: ['*']
jobs:
build:
permissions:
contents: read
strategy:
matrix:
include:
- os: ubuntu-latest
arch: x64
build-group: linux-x64
- os: ubuntu-latest
arch: x64
build-group: linux-arm
- os: ubuntu-latest
arch: x64
build-group: android-arm
# At the time of writing macos-latest is mac 10; we need 11 to build a universal binary.
- os: macos-11
arch: x64
build-group: darwin-x64+arm64
- os: windows-latest
arch: x86
build-group: win32-x86
- os: windows-latest
arch: x64
build-group: win32-x64
runs-on: ${{ matrix.os }}
name: Build ${{ matrix.build-group }}
env:
BUILD_GROUP: ${{ matrix.build-group }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 14
architecture: ${{ matrix.arch }}
- name: Install
run: npm install --ignore-scripts
- name: Prebuild
run: npm run prebuild-$BUILD_GROUP
shell: bash
- name: Prepare artifact
run: tar -zcvf $BUILD_GROUP.tar.gz -C prebuilds .
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.BUILD_GROUP }}
path: ${{ env.BUILD_GROUP }}.tar.gz
retention-days: 1
release:
needs: build
permissions:
contents: write
runs-on: ubuntu-latest
name: Release
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Create GitHub release
uses: docker://antonyurchenko/git-release:v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: artifacts/*/*.tar.gz