-
Notifications
You must be signed in to change notification settings - Fork 43
105 lines (83 loc) · 2.22 KB
/
ci.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
name: Socket CI
on: [push]
jobs:
mac_build:
name: macOS build
runs-on: macOS-13
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/[email protected]
with:
node-version: 20.x
- name: webfactory/ssh-agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Build app
run: |
npm install
npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ssc_artifacts_linux
path: /Users/runner/.local/share/socket/
retention-days: 1
linux_build:
name: Linux build
runs-on: ubuntu-latest-m
timeout-minutes: 20
needs: lint
steps:
- uses: actions/checkout@v3
- name: webfactory/ssh-agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Build app
run: |
npm install
npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ssc_artifacts_linux
path: /Users/runner/.local/share/socket/
retention-days: 1
windows:
name: Windows
runs-on: windows-latest
timeout-minutes: 20
needs: lint
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
- name: Configure SSH
run: Set-Service ssh-agent -StartupType Manual
- name: Start SSH
run: Start-Service ssh-agent
- name: Add SSH key
run: echo $env:SSH_PRIVATE_KEY | ssh-add -
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add github.com to known_hosts
run: |
mkdir ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Build app
run: |
npm install
npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ssc_artifacts_linux
path: /Users/runner/.local/share/socket/
retention-days: 1