-
Notifications
You must be signed in to change notification settings - Fork 1
103 lines (89 loc) · 3.72 KB
/
release.yml
File metadata and controls
103 lines (89 loc) · 3.72 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
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
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g. v0.1.2)'
required: true
default: 'v0.1.0'
jobs:
build:
name: Build for ${{ matrix.target }}
runs-on: windows-latest
strategy:
matrix:
include:
- target: x86_64-pc-windows-msvc
arch: x64
- target: i686-pc-windows-msvc
arch: x86
- target: aarch64-pc-windows-msvc
arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# ── System setup ─────────────────────────────────────────────────────────
- name: Install build tools (WIX, NSIS)
run: |
choco install wixtoolset nsis -y --no-progress
echo "C:\Program Files (x86)\NSIS" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
# ── Bun + frontend ──────────────────────────────────────────────────────
- name: Set up Bun
uses: oven-sh/setup-bun@v2
- name: Install frontend dependencies
run: bun install
# ── Rust ────────────────────────────────────────────────────────────────
- name: Set up Rust (${{ matrix.target }})
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache Rust build
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
key: ${{ matrix.target }}
# ── Build & bundle ──────────────────────────────────────────────────────
- name: Build Tauri app (${{ matrix.arch }})
run: bun run tauri build -- --target ${{ matrix.target }}
# ── Upload artifacts ────────────────────────────────────────────────────
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.arch }}
path: src-tauri/target/${{ matrix.target }}/release/bundle/
retention-days: 1
release:
name: Create GitHub Release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# ── Download all artifacts ──────────────────────────────────────────────
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
# ── Create release ──────────────────────────────────────────────────────
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: '⚡ Process Manager ${{ github.ref_name }}'
draft: false
prerelease: false
generate_release_notes: true
files: |
artifacts/release-*/msi/*.msi
artifacts/release-*/nsis/*.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}