[200_22] bump to Mogan STEM v2026.2.4 #47
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CD for Mogan STEM on Debian 13 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| manual_version: | |
| description: 'Set version manually (e.g. 1.2.3)' | |
| required: false | |
| default: '' | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| debian13-build: | |
| runs-on: ubuntu-latest | |
| container: debian:trixie | |
| timeout-minutes: 60 | |
| env: | |
| APPIMAGE_EXTRACT_AND_RUN: 1 | |
| DEBIAN_FRONTEND: noninteractive | |
| XMAKE_ROOT: y | |
| QT_QPA_PLATFORM: offscreen | |
| steps: | |
| # ========================================== | |
| # 1. 环境准备 | |
| # ========================================== | |
| - name: Install Base Tools | |
| run: | | |
| apt-get update | |
| # [CI reference] 同步 CI 的基础工具列表 (7zip, ninja, cmake, pandoc等) | |
| apt-get install -y \ | |
| git curl wget unzip 7zip \ | |
| build-essential cmake ninja-build python3 \ | |
| ca-certificates \ | |
| pkg-config | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - uses: xmake-io/github-action-setup-xmake@v1 | |
| with: | |
| xmake-version: v2.9.6 | |
| - name: Update Xrepo | |
| run: xrepo update-repo | |
| # ========================================== | |
| # 2. 安装编译依赖 | |
| # ========================================== | |
| - name: Install Dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y \ | |
| libmimalloc-dev \ | |
| libgit2-dev \ | |
| zlib1g-dev \ | |
| libssl-dev \ | |
| libcurl4-openssl-dev \ | |
| libfreetype-dev \ | |
| libfontconfig-dev \ | |
| libjpeg62-turbo-dev \ | |
| libdbus-1-3 libglib2.0-0t64 libegl1 libgl-dev libxkbcommon0 \ | |
| fonts-noto-cjk \ | |
| ghostscript \ | |
| qt6-base-dev \ | |
| libqt6svg6-dev \ | |
| libqt6networkauth6-dev \ | |
| qt6-base-private-dev \ | |
| fakeroot \ | |
| debhelper \ | |
| file \ | |
| fcitx5-frontend-qt6 | |
| apt remove -y 7zip | |
| # ========================================== | |
| # 3. 编译流程 | |
| # ========================================== | |
| - name: Config | |
| run: xmake config --yes -vD -m release --policies=build.ccache | |
| - name: Build | |
| run: xmake build -vD stem | |
| # ========================================== | |
| # 4. 确定版本号 | |
| # ========================================== | |
| - name: Determine Version | |
| id: get_version | |
| shell: bash | |
| run: | | |
| REF_NAME="${{ github.ref }}" | |
| MANUAL_VER="${{ inputs.manual_version }}" | |
| if [ -n "$MANUAL_VER" ]; then | |
| RAW_VERSION="$MANUAL_VER" | |
| elif [[ "$REF_NAME" == refs/tags/* ]]; then | |
| RAW_VERSION=${REF_NAME#refs/tags/} | |
| RAW_VERSION=${RAW_VERSION//\//} | |
| else | |
| RAW_VERSION=$(date +%Y.%m.%d) | |
| fi | |
| if [[ "$RAW_VERSION" == v* ]]; then | |
| CLEAN_VERSION=${RAW_VERSION#v} | |
| else | |
| CLEAN_VERSION="$RAW_VERSION" | |
| fi | |
| echo "File Name will use: $RAW_VERSION" | |
| echo "Internal Package Version will use: $CLEAN_VERSION" | |
| echo "VERSION_TAG=$RAW_VERSION" >> $GITHUB_ENV | |
| echo "VERSION_NUM=$CLEAN_VERSION" >> $GITHUB_ENV | |
| # ========================================== | |
| # 5. 打包 | |
| # ========================================== | |
| - name: Generate Debian Package | |
| run: | | |
| chmod +x packages/debian/package.sh | |
| export VERSION=${{ env.VERSION_NUM }} | |
| packages/debian/package.sh | |
| mv ../mogan-stem_*.deb ./mogan-stem-${{ env.VERSION_TAG }}-debian13-amd64.deb | |
| # ========================================== | |
| # 6. 上传与发布 | |
| # ========================================== | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| name: mogan-stem-debian13-${{ env.VERSION_TAG }} | |
| path: mogan-stem-*-debian13-amd64.deb | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| prerelease: true | |
| files: | | |
| mogan-stem-*-debian13-amd64.deb |