This repository has been archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (69 loc) · 1.98 KB
/
snapshot_release.yaml
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
name: Create snapshot release
on:
push:
branches:
- develop
repository_dispatch:
types:
- snapshot-release
jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{matrix.os}}
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Configure Linux environment
if: ${{matrix.os == 'ubuntu-latest'}}
run: sudo apt-get install -y cmake libx11-dev zlib1g-dev libpng-dev libxtst-dev build-essential
- name: Install
run: npm ci
- name: Install latest libnut snapshots
run: |
npm i @nut-tree/libnut-darwin@next
npm i @nut-tree/libnut-linux@next
npm i @nut-tree/libnut-win32@next
- name: Test with latest snapshots
run: npm t
deploy:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Configure Linux environment
run: sudo apt-get install -y cmake libx11-dev zlib1g-dev libpng-dev libxtst-dev build-essential
- name: Install
run: npm ci
- name: Install latest libnut snapshots
run: |
npm i @nut-tree/libnut-darwin@next
npm i @nut-tree/libnut-linux@next
npm i @nut-tree/libnut-win32@next
- name: Publish snapshot release
run: ./.build/pre-release.sh
shell: bash
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
dispatch:
needs:
- deploy
runs-on: ubuntu-latest
steps:
- name: Dispatch snapshot release
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.SNAPSHOT_DISPATCH_TOKEN }}
repository: nut-tree/nut.js
event-type: snapshot-release