forked from LmeSzinc/AzurLaneAutoScript
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 2.21 KB
/
Copy pathrelease.yml
File metadata and controls
73 lines (60 loc) · 2.21 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
name: Release
# Build the desktop release asset and publish it as a GitHub Release.
# A release is a single NSIS installer (shell + bundled sidecar); the
# installed app's updater (module/webui/updater.py) lists releases,
# downloads the installer and runs it silently - the installer replaces
# the shell and sidecar files and restarts the app.
on:
push:
# Version tags (vYYYY.MM.DD, e.g. v2026.08.21); see deploy/packaging/README.md
tags: ["v*"]
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Set up Python 3.13
run: uv python install 3.13
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 11
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 24
# Main dependency group only; the dev group is not needed to package.
- name: Sync dependencies
run: uv sync --frozen --no-group dev
- name: Build frontend
working-directory: webapp-tauri
run: |
pnpm install --frozen-lockfile
pnpm build
- name: Build backend sidecar
run: |
uv tool install "pyinstaller>=6.19"
$env:PATH = "$env:USERPROFILE\.local\bin;$env:PATH"
pyinstaller --clean --noconfirm deploy/packaging/alas_backend.spec
# version.txt = the release tag; the updater reports it as the
# current version of the running build.
Set-Content -Path "dist/alas-backend/version.txt" -Value "$env:GITHUB_REF_NAME" -NoNewline
- name: Build NSIS installer
working-directory: webapp-tauri
env:
CI: "true"
run: |
pnpm tauri build
Copy-Item -ErrorAction Stop "src-tauri/target/release/bundle/nsis/*-setup.exe" "..\Alas_${{ github.ref_name }}_x64-setup.exe" -Force
Get-ChildItem "..\Alas_*" | ForEach-Object { $_.FullName }
- name: Publish release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
Alas_${{ github.ref_name }}_x64-setup.exe