-
Notifications
You must be signed in to change notification settings - Fork 101
87 lines (84 loc) · 3.06 KB
/
Copy pathcd_research_on_windows.yml
File metadata and controls
87 lines (84 loc) · 3.06 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: CD for Mogan STEM on Windows
on:
workflow_dispatch:
push:
tags:
- '*'
permissions:
contents: write
jobs:
windowsbuild:
runs-on: windows-2025
timeout-minutes: 45
steps:
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: v3.0.4
- name: update repo
run: |
xrepo update-repo
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: MinoruSekine/setup-scoop@v4.0.1
with:
install_scoop: 'true'
buckets: main
apps: wget pandoc ghostscript
update_path: 'true'
- name: Noto fonts
shell: pwsh
run: |
mkdir D:\a\mogan\mogan\TeXmacs\fonts\opentype\noto
cd D:\a\mogan\mogan\TeXmacs\fonts\opentype\noto
wget https://github.com/XmacsLabs/mogan/releases/download/v1.2.9.7/NotoSansCJK-Bold.ttc
wget https://github.com/XmacsLabs/mogan/releases/download/v1.2.9.7/NotoSansCJK-Regular.ttc
wget https://github.com/XmacsLabs/mogan/releases/download/v1.2.9.7/NotoSerifCJK-Bold.ttc
wget https://github.com/XmacsLabs/mogan/releases/download/v1.2.9.7/NotoSerifCJK-Regular.ttc
- name: config
run: xmake config --yes -vD -m release
- name: build
run: xmake build -vD stem
- name: install
run: xmake install -vD stem
- name: gs and pandoc
run: |
cp ~\scoop\apps\pandoc\current\pandoc.exe D:\a\mogan\mogan\build\packages\stem\data\bin
wget https://github.com/XmacsLabs/mogan/releases/download/v1.2.9.7/gs.exe
- name: Generate Installer
run: xmake pack --yes -vD stem
- name: Rename installer using XMACS_VERSION
shell: pwsh
run: |
$content = Get-Content "xmake/vars.lua" -Raw -ErrorAction SilentlyContinue
if ($content -match 'XMACS_VERSION.*"(.*)"') {
$ver = $Matches[1]
Write-Host "Found version: $ver"
$packDir = Join-Path -Path "build" -ChildPath "xpack/stem"
if (Test-Path $packDir) {
$exe = Get-ChildItem -Path $packDir -Filter "*.exe" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
if ($exe) {
$newName = "MoganSTEM-v${ver}-64bit-installer.exe"
Write-Host "Renaming $($exe.Name) -> $newName"
Rename-Item -Path $exe.FullName -NewName $newName -Force
Write-Host "Rename complete"
} else {
Write-Warning "No .exe installer found in $packDir"
}
} else {
Write-Warning "Package directory '$packDir' not found"
}
}
- name: Upload
uses: actions/upload-artifact@v4
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
with:
path: |
build/xpack/stem/*.exe
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: true
files: |
build/xpack/stem/*.exe