-
-
Notifications
You must be signed in to change notification settings - Fork 135
79 lines (77 loc) · 2.32 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
73
74
75
76
77
78
79
name: Create snapshot release
on:
push:
branches:
- develop
paths-ignore:
- "**/*.md"
repository_dispatch:
types:
- snapshot-release
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [16]
runs-on: ${{matrix.os}}
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: ${{matrix.node}}
- name: Setup Docker
if: ${{matrix.os == 'ubuntu-latest'}}
run: |
docker pull s1hofmann/nut-ci:latest
docker run -it -d --name nut-ci --shm-size 8gb --user $(id -u):$(id -g) -v ${PWD}:${PWD}:rw s1hofmann/nut-ci:latest bash
- name: Install
run: npm ci
- name: Install @nut-tree/libnut@next
run: npm i @nut-tree/libnut@next
- name: Compile
run: npm run compile
- name: Init window e2e test subpackage
run: npm --prefix e2e/window-test ci
- name: Run tests
uses: GabrielBB/xvfb-action@v1
with:
run: npm test
- name: Run Docker E2E tests
if: ${{matrix.os == 'ubuntu-latest'}}
run: docker exec nut-ci bash -c "bash $PWD/.build/build.sh ${PWD} ${{matrix.node}}"
- name: Run Electron e2e test subpackage
uses: GabrielBB/xvfb-action@v1
with:
run: npm --prefix e2e/electron-test cit
deploy:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
- name: Install
run: npm ci
- name: Install @nut-tree/libnut@next
run: npm i @nut-tree/libnut@next
- name: Create snapshot release
run: bash ./.build/pre-release.sh
- name: Publish snapshot release to npm
run: npm run publish-next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v2
with:
registry-url: "https://npm.pkg.github.com"
- name: Publish snapshot release to GPR
run: npm run publish-next
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}