@@ -31,27 +31,62 @@ jobs:
3131 run : test "refs/tags/v${{ steps.version.outputs.version }}" = ${{ github.ref }}
3232 - name : Install required build environment
3333 uses : ./.github/actions/archlinux_build_environment_setup
34- - name : Build (and install) fcitx5-cskk
35- uses : fcitx/github-actions@cmake
36- with :
37- path : fcitx5-cskk
38- cmake-option : >-
39- -DENABLE_QT=On -DUSE_QT6=On -DFCITX_INSTALL_USE_FCITX_SYS_PATHS=ON
34+ - name : Install dpkg for package verification
35+ run : pacman -S --noconfirm dpkg
36+ - name : Build fcitx5-cskk
37+ run : |
38+ cmake -B build \
39+ -DCMAKE_PREFIX_PATH=/opt/fcitx \
40+ -DCMAKE_BUILD_TYPE=Release \
41+ -DCPACK_PACKAGING_INSTALL_PREFIX=/usr \
42+ -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu \
43+ -DENABLE_QT=On \
44+ -DUSE_QT6=On
45+ cmake --build build --parallel
4046 - name : Pack deb
4147 run : |
42- cd ${{ runner.workspace }}/build
43- cpack -G DEB -DFCITX_INSTALL_USE_FCITX_SYS_PATHS=On
48+ cd build
49+ cpack -G DEB \
50+ -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=amd64
51+ cp _CPack_Packages/Linux/DEB/fcitx5-cskk_*.deb .
52+ # - name: Debug - List build directory
53+ # run: |
54+ # echo "=== Contents of build/ directory ==="
55+ # ls -la build/
56+ # echo "=== Searching for .deb files ==="
57+ # find build/ -name "*.deb" -ls
58+ - name : Verify deb package contents
59+ run : |
60+ echo "=== Checking .deb package structure ==="
61+ dpkg -c build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
62+ echo ""
63+ echo "=== Verifying main plugin location ==="
64+ if dpkg -c build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb | grep -q "./usr/lib/x86_64-linux-gnu/fcitx5/fcitx5-cskk.so"; then
65+ echo "✓ Main plugin in correct location: /usr/lib/x86_64-linux-gnu/fcitx5/fcitx5-cskk.so"
66+ else
67+ echo "✗ ERROR: Main plugin not found at /usr/lib/x86_64-linux-gnu/fcitx5/fcitx5-cskk.so"
68+ exit 1
69+ fi
70+ - name : Rename deb for workflow_dispatch builds
71+ id : timestamp
72+ if : github.event_name == 'workflow_dispatch'
73+ run : |
74+ TIMESTAMP=$(date +%Y%m%d-%H%M%S)
75+ mv build/fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb \
76+ build/fcitx5-cskk_${{ steps.version.outputs.version }}_${TIMESTAMP}_amd64.deb
77+ echo "Renamed to: fcitx5-cskk_${{ steps.version.outputs.version }}_${TIMESTAMP}_amd64.deb"
78+ echo "timestamp=${TIMESTAMP}" >> ${GITHUB_OUTPUT}
4479 - name : Attatch artifact to Release
4580 if : github.event_name == 'release'
4681 uses : softprops/action-gh-release@v1
4782 with :
4883 files : |
49- ${{ runner.workspace }}/fcitx5-cskk/_packages /fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
84+ build /fcitx5-cskk_${{ steps.version.outputs.version }}_amd64.deb
5085 - name : Upload DEB artifact
5186 if : github.event_name == 'workflow_dispatch'
5287 uses : actions/upload-artifact@v4
5388 with :
54- name : fcitx5-cskk-deb
55- path : ${{ runner.workspace }} /fcitx5-cskk/_packages/fcitx5- cskk_${{ steps.version.outputs.version }} _amd64.deb
89+ name : fcitx5-cskk-deb-${{ steps.timestamp.outputs.timestamp }}
90+ path : build /fcitx5-cskk_* _amd64.deb
5691 if-no-files-found : error
5792 retention-days : 30
0 commit comments