-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·77 lines (66 loc) · 1.89 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
name: CI
on:
push:
workflow_dispatch:
jobs:
test:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout this repository
uses: actions/checkout@v4
with:
token: ${{ secrets['GITHUB_TOKEN'] }}
ref: ${{ github.ref }}
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Run ESLint on source
run: yarn lint
- name: Run tests
run: yarn test:unit
build-publish:
if: github.ref == 'refs/heads/master'
timeout-minutes: 30
needs: test
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform:
- name: 'macos-latest'
build-args: '--target aarch64-apple-darwin'
- name: 'macos-latest'
build-args: '--target x86_64-apple-darwin'
- name: 'windows-latest'
runs-on: ${{ matrix.platform.name }}
steps:
- name: Checkout this repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: install frontend dependencies
run: yarn install
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ncgmgr-v__VERSION__
releaseName: "NCGMGR v__VERSION__"
releaseDraft: true
prerelease: false
args: ${{ matrix.settings.platform.build-args }}