Skip to content

Commit c5e2485

Browse files
committed
Move precompile action into the release GH Action
issue #904
1 parent de2ce99 commit c5e2485

File tree

2 files changed

+59
-61
lines changed

2 files changed

+59
-61
lines changed

.github/workflows/precompile.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,66 @@ on:
55
types: [published]
66

77
jobs:
8+
precompile:
9+
if: contains(github.event.release.tag_name, 'v0.0.0-latest-master') == false
10+
strategy:
11+
matrix:
12+
include:
13+
- os: ubuntu-18.04
14+
platform: linux
15+
arch: x64
16+
- os: windows-latest
17+
platfrom: win32
18+
arch: x64
19+
- os: macos-latest
20+
platform: darwin
21+
arch: x64
22+
runs-on: ${{ matrix.os }}
23+
env:
24+
ARCHIVE_FILENAME: ${{github.event.release.tag_name}}-${{ matrix.platform }}-${{ matrix.arch }}.tar.gz
25+
steps:
26+
- uses: actions/checkout@v2
27+
28+
- uses: actions/setup-node@v2
29+
with:
30+
node-version: '16.x'
31+
32+
- name: Install ubuntu deps
33+
if: contains(matrix.os, 'ubuntu-18.04')
34+
run: sudo apt install mesa-common-dev libglu1-mesa-dev
35+
36+
- name: Install deps
37+
run: npm install
38+
39+
- name: Build nodegui
40+
run: npm run build
41+
env:
42+
CMAKE_BUILD_PARALLEL_LEVEL: 8
43+
44+
- name: Compress files
45+
uses: a7ul/tar-action@v1.0.2
46+
id: compress
47+
with:
48+
command: c
49+
cwd: ./build/Release
50+
files: |
51+
./nodegui_core.node
52+
outPath: ${{ ARCHIVE_FILENAME }}
53+
54+
- uses: actions/upload-artifact@v1
55+
with:
56+
name: ${{ ARCHIVE_FILENAME }}
57+
path: ${{ ARCHIVE_FILENAME }}
58+
59+
- name: Upload release binaries
60+
uses: alexellis/upload-assets@0.2.2
61+
env:
62+
GITHUB_TOKEN: ${{ github.token }}
63+
with:
64+
asset_paths: '["${{ ARCHIVE_FILENAME }}"]'
65+
866
publish-npm-package:
67+
needs: precompile
968
if: contains(github.event.release.tag_name, 'v0.0.0-latest-master') == false
1069
runs-on: ubuntu-latest
1170
steps:

0 commit comments

Comments
 (0)