-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (72 loc) · 2.33 KB
/
Copy pathwindows-package.yml
File metadata and controls
87 lines (72 loc) · 2.33 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
name: Windows Package
on:
pull_request:
push:
branches:
- main
tags:
- "v*"
workflow_dispatch:
release:
types:
- published
permissions:
contents: write
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[build]"
- name: Verify GUI import
run: python -c "import scholarref_gui; print('gui-import-ok')"
- name: Run tests
run: python -m pytest -q
- name: Install Inno Setup
run: choco install innosetup --no-progress --yes
- name: Build Windows installer and release artifacts
run: powershell -ExecutionPolicy Bypass -File .\scripts\build_windows_installer.ps1 -SkipTests
- name: Run silent installer smoke test
run: powershell -ExecutionPolicy Bypass -File .\scripts\test_windows_installer.ps1
- name: Write workflow summary
shell: pwsh
run: |
$manifest = Get-Content dist\release-manifest.json | ConvertFrom-Json
$hashes = Get-Content dist\SHA256SUMS.txt
@"
## ScholarRef Windows Artifacts
- Version: $($manifest.version)
- Signed: $($manifest.signed)
- Release model: unsigned freeware
- Supported targets: Windows 10 x64, Windows 11 x64
### SHA-256
```text
$($hashes -join "`n")
```
"@ | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append -Encoding utf8
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: ScholarRef-windows-x64
path: |
dist/ScholarRef-windows-x64.zip
dist/ScholarRef-setup-*.exe
dist/SHA256SUMS.txt
dist/release-manifest.json
- name: Attach assets to GitHub Release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: |
dist/ScholarRef-windows-x64.zip
dist/ScholarRef-setup-*.exe
dist/SHA256SUMS.txt
dist/release-manifest.json