forked from Spacetech/greenworks
-
Notifications
You must be signed in to change notification settings - Fork 2
95 lines (75 loc) · 2.23 KB
/
push.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
name: Build
on:
push:
jobs:
build:
runs-on: ${{ matrix.os }}
name: Build
continue-on-error: false
strategy:
fail-fast: false
matrix:
arch: [ia32, x64]
runtime: [nwjs, electron, node]
os: [macos-latest, ubuntu-latest, windows-latest]
exclude:
- os: macos-latest
arch: ia32
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout Node
uses: actions/setup-node@v2-beta
with:
node-version: "16"
- if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib
# Install dep
- if: matrix.os == 'macos-latest'
run: brew install p7zip
- uses: actions/setup-python@v2
with:
python-version: 2.7.18
# Extract
- run: 7z x sdk.zip -y -p${{ secrets.ZIP_PASSWORD }}
working-directory: ci
- run: mv sdk ../deps/steamworks_sdk
working-directory: ci
- run: npm install
working-directory: ci
- run: npm config set python python2.7
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
if: matrix.os == 'windows-latest'
- run: npm install
- run: npx tsc
working-directory: ci
- name: "Build"
shell: bash
run: node ./ci/dist/index.js --os=${{matrix.os}} --runtime=${{matrix.runtime}} --arch=${{matrix.arch}}
# - name: "Test"
# shell: bash
# run: node ./ci/dist/e2e/index.js --os=${{matrix.os}} --runtime=${{matrix.runtime}} --arch=${{matrix.arch}}
- name: get-npm-version
id: package-version
uses: tyankatsu0105/read-package-version-actions@v1
- uses: actions/upload-artifact@v2
with:
path: ./ci/artifacts/
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/download-artifact@v2
with:
path: ./artifacts
- run: ls -la ./artifacts
- name: Upload binaries to release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./artifacts/**
prerelease: true