99 steps :
1010 - name : Checkout
1111 uses : actions/checkout@v7
12- - name : Configure paths
13- run : |
14- New-Item -ItemType Directory -Force -Path ./artifacts/release/x64
15- New-Item -ItemType Directory -Force -Path ./artifacts/release/x86
16- New-Item -ItemType Directory -Force -Path ./artifacts/verbose/x64
17- New-Item -ItemType Directory -Force -Path ./artifacts/verbose/x86
12+ - name : Setup xmake
13+ uses : xmake-io/github-action-setup-xmake@v1
14+ with :
15+ xmake-version : 3.1.1
1816 - name : Build Release
1917 run : |
20- ./build.ps1
21- Copy-Item -Path ./build/windows/x64/release/doorstop.dll -Destination ./artifacts/release/x64/winhttp.dll
22- Copy-Item -Path ./build/windows/x64/release/.doorstop_version -Destination ./artifacts/release/x64/.doorstop_version
23- Copy-Item -Path ./build/windows/x86/release/doorstop.dll -Destination ./artifacts/release/x86/winhttp.dll
24- Copy-Item -Path ./build/windows/x86/release/.doorstop_version -Destination ./artifacts/release/x86/.doorstop_version
25- Copy-Item -Path ./assets/windows/doorstop_config.ini -Destination ./artifacts/release/x64/doorstop_config.ini
26- Copy-Item -Path ./assets/windows/doorstop_config.ini -Destination ./artifacts/release/x86/doorstop_config.ini
27- Copy-Item -Path ./LICENSE -Destination ./artifacts/release/LICENSE
28- - name : Build Verbose
18+ xmake pack
19+ - name : Build Debug
2920 run : |
30- ./build.ps1 -with_logging
31- Copy-Item -Path ./build/windows/x64/release/doorstop.dll -Destination ./artifacts/verbose/x64/winhttp.dll
32- Copy-Item -Path ./build/windows/x64/release/.doorstop_version -Destination ./artifacts/verbose/x64/.doorstop_version
33- Copy-Item -Path ./build/windows/x86/release/doorstop.dll -Destination ./artifacts/verbose/x86/winhttp.dll
34- Copy-Item -Path ./build/windows/x86/release/.doorstop_version -Destination ./artifacts/verbose/x86/.doorstop_version
35- Copy-Item -Path ./assets/windows/doorstop_config.ini -Destination ./artifacts/verbose/x64/doorstop_config.ini
36- Copy-Item -Path ./assets/windows/doorstop_config.ini -Destination ./artifacts/verbose/x86/doorstop_config.ini
37- Copy-Item -Path ./LICENSE -Destination ./artifacts/verbose/LICENSE
21+ xmake f -m debug
22+ xmake pack
3823 - name : Upload Release
3924 uses : actions/upload-artifact@v7
4025 with :
41- name : doorstop_win_release
42- path : artifacts/release
43- include-hidden-files : true
44- - name : Upload Verbose
26+ path : build/xpack/doorstop/doorstop_windows_release.zip
27+ archive : false
28+ - name : Upload Debug
4529 uses : actions/upload-artifact@v7
4630 with :
47- name : doorstop_win_verbose
48- path : artifacts/verbose
49- include-hidden-files : true
31+ path : build/xpack/doorstop/doorstop_windows_debug.zip
32+ archive : false
5033
5134 build-linux :
5235 runs-on : ubuntu-latest
@@ -58,108 +41,57 @@ jobs:
5841 steps :
5942 - name : Checkout
6043 uses : actions/checkout@v7
61- - name : Configure paths
62- run : |
63- bash -c "mkdir -p artifacts/{verbose,release,debug}/{x86,x64}"
6444 - name : Install dependencies
65- run : apt-get update && apt-get install -y git build-essential libreadline-dev ccache gcc-multilib g++-multilib clang curl
45+ run : apt-get update && apt-get install -y git build-essential libreadline-dev ccache gcc-multilib g++-multilib clang curl zip
46+ - name : Setup xmake
47+ uses : xmake-io/github-action-setup-xmake@v1
48+ with :
49+ xmake-version : 3.1.1
6650 - name : Build Release
6751 run : |
68- ./build.sh
69- cp build/linux/x86/release/libdoorstop.so artifacts/release/x86/libdoorstop.so
70- cp build/linux/x64/release/libdoorstop.so artifacts/release/x64/libdoorstop.so
71- cp build/linux/x86/release/.doorstop_version artifacts/release/x86/.doorstop_version
72- cp build/linux/x64/release/.doorstop_version artifacts/release/x64/.doorstop_version
73- cp assets/nix/run.sh artifacts/release/x86/run.sh
74- cp assets/nix/run.sh artifacts/release/x64/run.sh
75- cp LICENSE artifacts/release/LICENSE
76- - name : Build Verbose
77- run : |
78- ./build.sh -with_logging
79- cp build/linux/x86/release/libdoorstop.so artifacts/verbose/x86/libdoorstop.so
80- cp build/linux/x64/release/libdoorstop.so artifacts/verbose/x64/libdoorstop.so
81- cp build/linux/x64/release/.doorstop_version artifacts/verbose/x86/.doorstop_version
82- cp build/linux/x86/release/.doorstop_version artifacts/verbose/x64/.doorstop_version
83- cp assets/nix/run.sh artifacts/verbose/x86/run.sh
84- cp assets/nix/run.sh artifacts/verbose/x64/run.sh
85- cp LICENSE artifacts/verbose/LICENSE
52+ xmake pack
8653 - name : Build Debug
8754 run : |
88- ./build.sh -with_logging -debug
89- cp build/linux/x86/debug/libdoorstop.so artifacts/debug/x86/libdoorstop.so
90- cp build/linux/x64/debug/libdoorstop.so artifacts/debug/x64/libdoorstop.so
91- cp build/linux/x86/debug/.doorstop_version artifacts/debug/x86/.doorstop_version
92- cp build/linux/x64/debug/.doorstop_version artifacts/debug/x64/.doorstop_version
93- cp assets/nix/run.sh artifacts/debug/x86/run.sh
94- cp assets/nix/run.sh artifacts/debug/x64/run.sh
95- cp LICENSE artifacts/debug/LICENSE
55+ xmake f -m debug
56+ xmake pack
9657 - name : Upload Release
9758 uses : actions/upload-artifact@v7
9859 with :
99- name : doorstop_linux_release
100- path : artifacts/release
101- include-hidden-files : true
102- - name : Upload Verbose
103- uses : actions/upload-artifact@v4
104- with :
105- name : doorstop_linux_verbose
106- path : artifacts/verbose
107- include-hidden-files : true
60+ path : build/xpack/doorstop/doorstop_linux_release.zip
61+ archive : false
10862 - name : Upload Debug
10963 uses : actions/upload-artifact@v7
11064 with :
111- name : doorstop_linux_debug
112- path : artifacts/debug
113- include-hidden-files : true
65+ path : build/xpack/doorstop/doorstop_linux_debug.zip
66+ archive : false
11467
11568 build-macos :
11669 runs-on : macos-latest
11770
11871 steps :
11972 - name : Checkout
12073 uses : actions/checkout@v7
121- - name : Configure paths
122- run : |
123- mkdir -p artifacts/{verbose,release,debug}/universal
74+ - name : Setup xmake
75+ uses : xmake-io/github-action-setup-xmake@v1
76+ with :
77+ xmake-version : 3.1.1
12478 - name : Build Release
12579 run : |
126- ./build.sh
127- cp build/macosx/universal/release/libdoorstop.dylib artifacts/release/universal/libdoorstop.dylib
128- cp build/macosx/universal/release/.doorstop_version artifacts/release/universal/.doorstop_version
129- cp assets/nix/run.sh artifacts/release/universal/run.sh
130- cp LICENSE artifacts/release/LICENSE
131- - name : Build Verbose
132- run : |
133- ./build.sh -with_logging
134- cp build/macosx/universal/release/libdoorstop.dylib artifacts/verbose/universal/libdoorstop.dylib
135- cp build/macosx/universal/release/.doorstop_version artifacts/verbose/universal/.doorstop_version
136- cp assets/nix/run.sh artifacts/verbose/universal/run.sh
137- cp LICENSE artifacts/verbose/LICENSE
80+ xmake pack
13881 - name : Build Debug
13982 run : |
140- ./build.sh -with_logging -debug
141- cp build/macosx/universal/debug/libdoorstop.dylib artifacts/debug/universal/libdoorstop.dylib
142- cp build/macosx/universal/debug/.doorstop_version artifacts/debug/universal/.doorstop_version
143- cp assets/nix/run.sh artifacts/debug/universal/run.sh
144- cp LICENSE artifacts/debug/LICENSE
83+ xmake f -m debug
84+ xmake pack
14585 - name : Upload Release
14686 uses : actions/upload-artifact@v7
14787 with :
148- name : doorstop_macos_release
149- path : artifacts/release
150- include-hidden-files : true
151- - name : Upload Verbose
152- uses : actions/upload-artifact@v4
153- with :
154- name : doorstop_macos_verbose
155- path : artifacts/verbose
156- include-hidden-files : true
88+ path : build/xpack/doorstop/doorstop_macosx_release.zip
89+ archive : false
15790 - name : Upload Debug
15891 uses : actions/upload-artifact@v7
15992 with :
160- name : doorstop_macos_debug
161- path : artifacts/debug
162- include-hidden-files : true
93+ path : build/xpack/doorstop/doorstop_macosx_debug.zip
94+ archive : false
16395
16496 collect :
16597 runs-on : ubuntu-latest
@@ -176,6 +108,9 @@ jobs:
176108 path : artifacts
177109 - name : Grab version
178110 run : |
111+ for k in artifacts/*.zip; do mv "${k}" "${k%.zip}"; done
112+ for k in artifacts/doorstop_windows_*; do mv "${k}" "artifacts/doorstop_win_${k##*_}"; done
113+ for k in artifacts/doorstop_macosx_*; do mv "${k}" "artifacts/doorstop_macos_${k##*_}"; done
179114 VERSION=$(cat artifacts/doorstop_win_release/x86/.doorstop_version)
180115 echo "doorstop_version=$VERSION" >> $GITHUB_ENV
181116 - name : Create zips
0 commit comments