forked from Guepard-Corp/qwery-core
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (89 loc) · 2.52 KB
/
release.yml
File metadata and controls
106 lines (89 loc) · 2.52 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
104
105
106
name: Release
on:
workflow_dispatch:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
jobs:
build:
name: Build (${{ matrix.platform }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- platform: macos-arm64
os: macos-latest
- platform: windows-x64
os: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust build
uses: Swatinem/rust-cache@v2
with:
workspaces: apps/desktop/src-tauri -> target
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.18.1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.9'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build monorepo
run: pnpm build
env:
NODE_OPTIONS: --max-old-space-size=4096
- name: Package desktop app
run: pnpm desktop:package
env:
NODE_OPTIONS: --max-old-space-size=4096
- name: Upload macOS artifacts
if: matrix.platform == 'macos-arm64'
uses: actions/upload-artifact@v4
with:
name: Qwery-macos-arm64
path: apps/desktop/src-tauri/target/release/bundle/dmg/*.dmg
if-no-files-found: error
- name: Upload Windows artifacts
if: matrix.platform == 'windows-x64'
uses: actions/upload-artifact@v4
with:
name: Qwery-windows-x64
path: |
apps/desktop/src-tauri/target/release/bundle/nsis/*.exe
apps/desktop/src-tauri/target/release/bundle/msi/*.msi
if-no-files-found: error
release:
name: Create GitHub Release
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: Qwery ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
files: artifacts/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}