-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (54 loc) · 1.79 KB
/
Copy pathplugin-ci.yml
File metadata and controls
65 lines (54 loc) · 1.79 KB
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
name: Plugin CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
jobs:
package:
name: ${{ matrix.platform.name }}
strategy:
fail-fast: false
matrix:
platform:
- name: Windows x64
os: windows-latest
target: x86_64-pc-windows-msvc
out: dist/plugin-windows-x64
artifact: switchboard-windows-x64
- name: macOS arm64
os: macos-26
target: aarch64-apple-darwin
out: dist/plugin-macos-arm64
artifact: switchboard-macos-arm64
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Setup Rust
uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30
with:
toolchain: 1.97.0
targets: ${{ matrix.platform.target }}
- name: Install frontend dependencies
run: npm ci --prefix frontend
- name: Test backend
run: cargo test --manifest-path backend/Cargo.toml
- name: Build frontend
run: npm run build --prefix frontend
- name: Check plugin manifest
run: npx --yes @haloforge/plugin-pack@0.2.17 check .
- name: Package target
run: npx --yes @haloforge/plugin-pack@0.2.17 pack . --release --target ${{ matrix.platform.target }} --out ${{ matrix.platform.out }}
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.artifact }}
path: |
${{ matrix.platform.out }}/*.hfpkg
${{ matrix.platform.out }}/*.hfpkg.sha256