Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
Expand Down Expand Up @@ -87,3 +90,62 @@ jobs:
path: tmp/build/xpack/goldfish/*.deb
retention-days: 30
if-no-files-found: error

package-windows-zip:
runs-on: windows-2025
env:
XMAKE_GLOBALDIR: ${{ github.workspace }}/.xmake-global

steps:
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: v2.9.9

- name: git crlf
run: git config --global core.autocrlf false

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: cache packages from xrepo
uses: actions/cache@v4
with:
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
key: ${{ runner.os }}-xrepo-${{ hashFiles('**/xmake.lua') }}

- name: xmake repo --update
run: xmake repo --update

- name: Config and Build
run: |
xmake config -vyD -o tmp/build -m releasedbg --repl=true --yes
xmake build goldfish

- name: Package
run: xmake pack -vyD -f zip goldfish

- name: Create summary table
shell: pwsh
run: |
$dir = "tmp/build/xpack/goldfish"
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "## Generated package files"
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value ""
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Type | File | Size |"
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "|------|------|------|"
Get-ChildItem -Path $dir -Filter *.zip | ForEach-Object {
$size = "{0:N2} MiB" -f ($_.Length / 1MB)
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "| Windows ZIP | ``$($_.Name)`` | $size |"
}
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value ""
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "*目录: ``$dir``*"

- name: Upload Windows zip artifacts
uses: actions/upload-artifact@v4
with:
name: goldfish-windows-zip-packages
path: tmp/build/xpack/goldfish/*.zip
retention-days: 30
if-no-files-found: error
3 changes: 3 additions & 0 deletions devel/200_31.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# [200_31]

## 2026/03/13 支持Goldfish Scheme Windows 安装包
6 changes: 5 additions & 1 deletion xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ end
includes("@builtin/xpack")

xpack ("goldfish")
set_formats("deb", "rpm", "srpm")
if is_plat("windows") then
set_formats("zip")
else
set_formats("deb", "rpm", "srpm")
end
set_author("Da Shen <da@liii.pro>")
set_license("Apache-2.0")
set_title("Goldfish Scheme")
Expand Down
Loading