1
0
Fork 0
mirror of https://github.com/EDeev/quizlab.git synced 2026-10-07 20:49:34 +03:00

Релиз: установщик клиента для Windows (Inno Setup); образы API backend и nginx в GHCR по тегу

This commit is contained in:
Деев Егор Викторович 2026-10-06 22:21:51 +03:00
parent ef6e36ae16
commit cb844b14e2
3 changed files with 89 additions and 2 deletions

40
.github/workflows/docker.yml vendored Normal file
View file

@ -0,0 +1,40 @@
name: Docker
on:
push:
tags: ["v*"]
workflow_dispatch:
jobs:
image:
name: Образ ${{ matrix.part }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
part: [backend, nginx]
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# один пакет quizlab, части API различаются тегами: backend-1.2.3 / backend, nginx-1.2.3 / nginx
- id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/edeev/quizlab
flavor: latest=false
tags: |
type=semver,pattern={{version}},prefix=${{ matrix.part }}-
type=raw,value=${{ matrix.part }}
- uses: docker/build-push-action@v6
with:
context: lab-2/local/${{ matrix.part }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View file

@ -30,15 +30,22 @@ jobs:
# рантайм MSVC рядом с программой — чтобы не требовался Visual C++ Redistributable # рантайм MSVC рядом с программой — чтобы не требовался Visual C++ Redistributable
foreach ($d in "msvcp140.dll","msvcp140_1.dll","vcruntime140.dll","vcruntime140_1.dll") { Copy-Item "$env:WINDIR\System32\$d" dist/quizlab-client/ } foreach ($d in "msvcp140.dll","msvcp140_1.dll","vcruntime140.dll","vcruntime140_1.dll") { Copy-Item "$env:WINDIR\System32\$d" dist/quizlab-client/ }
Compress-Archive -Path dist/quizlab-client -DestinationPath quizlab-client-windows-x64.zip Compress-Archive -Path dist/quizlab-client -DestinationPath quizlab-client-windows-x64.zip
- name: Установщик (Inno Setup)
run: |
choco install innosetup --no-progress -y | Out-Null
$v = if ("${{ github.ref_type }}" -eq "tag") { "${{ github.ref_name }}".TrimStart("v") } else { "0.0.0" }
& "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" /Q "/DAppVersion=$v" lab-3/installer/quizlab-client.iss
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: windows name: windows
path: quizlab-client-windows-x64.zip path: |
quizlab-client-windows-x64.zip
quizlab-client-setup.exe
- name: Файл в релиз - name: Файл в релиз
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ github.token }}
run: gh release upload "${{ github.ref_name }}" quizlab-client-windows-x64.zip --clobber run: gh release upload "${{ github.ref_name }}" quizlab-client-windows-x64.zip quizlab-client-setup.exe --clobber
linux: linux:
name: Qt-клиент для Linux (AppImage) name: Qt-клиент для Linux (AppImage)

View file

@ -0,0 +1,40 @@
; Установщик Qt-клиента для Windows (Inno Setup 6). Версия передаётся из CI: ISCC /DAppVersion=1.0.1
#ifndef AppVersion
#define AppVersion "0.0.0"
#endif
[Setup]
AppId={{6F3B2C1E-9A4D-4E7B-8C21-5D0F7A9B3E64}
AppName=Quiz Client
AppVersion={#AppVersion}
AppPublisher=Деев Егор Викторович
AppPublisherURL=https://github.com/EDeev/quizlab
DefaultDirName={autopf}\Quiz Client
DefaultGroupName=Quiz Client
UninstallDisplayIcon={app}\quizlab-client.exe
OutputDir=..\..
OutputBaseFilename=quizlab-client-setup
Compression=lzma2
SolidCompression=yes
WizardStyle=modern
ArchitecturesAllowed=x64compatible
ArchitecturesInstallIn64BitMode=x64compatible
PrivilegesRequiredOverridesAllowed=dialog
[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "..\..\dist\quizlab-client\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons]
Name: "{group}\Quiz Client"; Filename: "{app}\quizlab-client.exe"
Name: "{group}\{cm:UninstallProgram,Quiz Client}"; Filename: "{uninstallexe}"
Name: "{autodesktop}\Quiz Client"; Filename: "{app}\quizlab-client.exe"; Tasks: desktopicon
[Run]
Filename: "{app}\quizlab-client.exe"; Description: "{cm:LaunchProgram,Quiz Client}"; Flags: nowait postinstall skipifsilent