Release packages #72
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: Release packages | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| env: | |
| FLUTTER_VERSION: 3.44.7 | |
| jobs: | |
| windows: | |
| name: Windows ${{ matrix.arch }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x64 | |
| runner: windows-2025 | |
| channel: stable | |
| - arch: arm64 | |
| runner: windows-11-arm | |
| channel: main | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: ${{ matrix.channel }} | |
| cache: true | |
| - uses: dtolnay/rust-toolchain@1.92.0 | |
| - name: Install Windows packagers | |
| shell: powershell | |
| run: choco install 7zip innosetup wixtoolset --no-progress -y | |
| - name: Build packages | |
| run: >- | |
| python build_app.py -p windows -a ${{ matrix.arch }} | |
| -f exe msi msix zip 7z tar.gz tar.xz tar.bz2 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mdsscope-windows-${{ matrix.arch }} | |
| path: build/dist/* | |
| if-no-files-found: error | |
| windows-msixbundle: | |
| name: Windows MSIX bundle | |
| needs: [windows] | |
| runs-on: windows-2025 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: mdsscope-windows-* | |
| path: msix-input | |
| merge-multiple: true | |
| - name: Build the unsigned multi-architecture bundle | |
| run: >- | |
| python scripts/build_msixbundle.py msix-input | |
| build/dist/mdsscope-windows.msixbundle | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mdsscope-windows-msixbundle | |
| path: build/dist/mdsscope-windows.msixbundle | |
| if-no-files-found: error | |
| macos: | |
| name: macOS arm64, x64, and universal | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: stable | |
| cache: true | |
| - uses: dtolnay/rust-toolchain@1.92.0 | |
| - name: Install 7-Zip | |
| run: brew install sevenzip | |
| - name: Build packages | |
| run: >- | |
| python3 build_app.py -p macos -a universal | |
| -f app dmg pkg xcarchive zip 7z tar.gz tar.xz tar.bz2 | |
| - name: Verify the application bundle | |
| run: | | |
| codesign --verify --deep --strict build/dist/mdsscope-macos-arm64-unsigned.app | |
| codesign --verify --deep --strict build/dist/mdsscope-macos-x64-unsigned.app | |
| codesign --verify --deep --strict build/dist/mdsscope-macos-universal-unsigned.app | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mdsscope-macos-all | |
| path: build/dist/* | |
| if-no-files-found: error | |
| linux: | |
| name: Linux ${{ matrix.arch }} | |
| runs-on: ${{ matrix.runner }} | |
| container: ubuntu:20.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x64 | |
| runner: ubuntu-24.04 | |
| channel: stable | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| channel: main | |
| steps: | |
| - name: Install baseline build tools | |
| run: | | |
| apt-get update | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
| build-essential ca-certificates clang cmake curl git jq libgtk-3-dev \ | |
| libsecret-1-dev ninja-build nasm patchelf p7zip-full perl pkg-config python3 \ | |
| rpm squashfs-tools unzip xz-utils zstd | |
| - name: Install AppImage tooling | |
| shell: bash | |
| run: | | |
| case "${{ matrix.arch }}" in | |
| x64) appimage_arch=x86_64 ;; | |
| arm64) appimage_arch=aarch64 ;; | |
| esac | |
| mkdir -p /opt/appimagetool | |
| curl -fL "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${appimage_arch}.AppImage" \ | |
| -o /opt/appimagetool.AppImage | |
| chmod +x /opt/appimagetool.AppImage | |
| cd /opt/appimagetool | |
| /opt/appimagetool.AppImage --appimage-extract | |
| ln -s /opt/appimagetool/squashfs-root/AppRun /usr/local/bin/appimagetool | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: ${{ matrix.channel }} | |
| cache: true | |
| - name: Trust the cached Flutter SDK checkout | |
| run: git config --global --add safe.directory "$FLUTTER_ROOT" | |
| - uses: dtolnay/rust-toolchain@1.92.0 | |
| - name: Build packages | |
| run: >- | |
| python3 build_app.py -p linux -a ${{ matrix.arch }} | |
| -f deb rpm pkg.tar.zst pkg.tar.xz AppImage snap | |
| zip 7z tar.gz tar.xz tar.bz2 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mdsscope-linux-${{ matrix.arch }} | |
| path: build/dist/* | |
| if-no-files-found: error | |
| linux-flatpak: | |
| name: Linux Flatpak ${{ matrix.arch }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x64 | |
| runner: ubuntu-24.04 | |
| channel: stable | |
| - arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| channel: main | |
| steps: | |
| - name: Install build tools and Flatpak runtime | |
| run: | | |
| sudo apt-get update | |
| sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
| build-essential clang cmake flatpak libgtk-3-dev libsecret-1-dev \ | |
| ninja-build nasm patchelf perl pkg-config | |
| flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
| flatpak install --user --noninteractive flathub org.gnome.Platform//48 org.gnome.Sdk//48 | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: ${{ matrix.channel }} | |
| cache: true | |
| - uses: dtolnay/rust-toolchain@1.92.0 | |
| - name: Build Flatpak package | |
| run: python3 build_app.py -p linux -a ${{ matrix.arch }} -f flatpak | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mdsscope-linux-flatpak-${{ matrix.arch }} | |
| path: build/dist/*.flatpak | |
| if-no-files-found: error | |
| linux-portable-runtime: | |
| needs: [linux] | |
| runs-on: ${{ matrix.runner }} | |
| container: ${{ matrix.image }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Ubuntu 24.04 | |
| runner: ubuntu-24.04 | |
| arch: x64 | |
| image: ubuntu:24.04 | |
| family: debian | |
| launch: true | |
| - name: Fedora 44 | |
| runner: ubuntu-24.04 | |
| arch: x64 | |
| image: fedora:44 | |
| family: fedora | |
| launch: true | |
| - name: Enterprise Linux 10 | |
| runner: ubuntu-24.04 | |
| arch: x64 | |
| image: rockylinux/rockylinux:10 | |
| family: enterprise | |
| launch: false | |
| - name: Enterprise Linux 10 ARM64 | |
| runner: ubuntu-24.04-arm | |
| arch: arm64 | |
| image: rockylinux/rockylinux:10 | |
| family: enterprise | |
| launch: false | |
| name: Portable Linux / ${{ matrix.name }} | |
| steps: | |
| - name: Install Ubuntu verifier runtime | |
| if: matrix.family == 'debian' | |
| shell: bash | |
| run: | | |
| apt-get update | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
| binutils git libegl-mesa0 libegl1 libgl1-mesa-dri \ | |
| libgles2 libgtk-3-0t64 libsecret-1-0 libstdc++6 python3 unzip xvfb | |
| - name: Install Fedora verifier runtime | |
| if: matrix.family == 'fedora' | |
| run: >- | |
| dnf install -y binutils git gnome-settings-daemon gtk3 libepoxy | |
| libglvnd-egl libsecret libstdc++ mesa-dri-drivers mesa-libEGL | |
| python3 unzip | |
| xorg-x11-server-Xvfb | |
| - name: Install Enterprise Linux verifier runtime | |
| if: matrix.family == 'enterprise' | |
| run: >- | |
| dnf install -y binutils git gtk3 libepoxy libsecret libstdc++ | |
| python3 unzip | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: mdsscope-linux-${{ matrix.arch }} | |
| path: build/dist | |
| - name: Verify portable dependency closure | |
| run: >- | |
| python3 scripts/verify_linux_portable.py | |
| build/dist/mdsscope-linux-${{ matrix.arch }}.zip | |
| --max-glibc 2.31 | |
| - name: Smoke-launch portable application | |
| if: matrix.launch | |
| env: | |
| LIBGL_ALWAYS_SOFTWARE: "1" | |
| run: >- | |
| python3 scripts/verify_linux_portable.py | |
| build/dist/mdsscope-linux-${{ matrix.arch }}.zip | |
| --max-glibc 2.31 --launch | |
| android: | |
| name: Android | |
| runs-on: ubuntu-24.04 | |
| env: | |
| ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
| MDSSCOPE_ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
| MDSSCOPE_ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
| MDSSCOPE_ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: stable | |
| cache: true | |
| - uses: dtolnay/rust-toolchain@1.92.0 | |
| - name: Install the pinned Android NDK | |
| run: '"$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;28.2.13676358"' | |
| - name: Install pinned bundletool | |
| run: | | |
| curl -fL https://github.com/google/bundletool/releases/download/1.18.3/bundletool-all-1.18.3.jar \ | |
| -o "$RUNNER_TEMP/bundletool-all-1.18.3.jar" | |
| echo "BUNDLETOOL_JAR=$RUNNER_TEMP/bundletool-all-1.18.3.jar" >> "$GITHUB_ENV" | |
| - name: Install Android release key when configured | |
| shell: bash | |
| run: | | |
| if [[ -n "$ANDROID_KEYSTORE_BASE64" ]]; then | |
| keystore="$RUNNER_TEMP/mdsscope-release.jks" | |
| printf '%s' "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$keystore" | |
| echo "MDSSCOPE_ANDROID_KEYSTORE=$keystore" >> "$GITHUB_ENV" | |
| else | |
| echo "::warning::Android signing secrets are absent; APKs will use the local test identity." | |
| fi | |
| - name: Build APKs and Android App Bundle | |
| run: python3 build_app.py -p android -f apk aab apks | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mdsscope-android | |
| path: build/dist/* | |
| if-no-files-found: error | |
| apple-mobile: | |
| name: iOS and iPadOS | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: stable | |
| cache: true | |
| - uses: dtolnay/rust-toolchain@1.92.0 | |
| - name: Install 7-Zip | |
| run: brew install sevenzip | |
| - name: Build unsigned Apple mobile packages | |
| run: >- | |
| python3 build_app.py -p ios -p ipados | |
| -f unsigned-ipa unsigned-app xcarchive zip 7z tar.gz tar.xz tar.bz2 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mdsscope-apple-mobile | |
| path: build/dist/* | |
| if-no-files-found: error | |
| publish: | |
| name: Publish GitHub release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: [windows, windows-msixbundle, macos, linux, linux-flatpak, linux-portable-runtime, android, apple-mobile] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Generate release checksums | |
| working-directory: artifacts | |
| run: find . -maxdepth 1 -type f ! -name SHA256SUMS -printf '%f\n' | sort | xargs sha256sum > SHA256SUMS | |
| - name: Upload packages to the tag release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| run: | | |
| gh release view "${GITHUB_REF_NAME}" >/dev/null 2>&1 || gh release create "${GITHUB_REF_NAME}" --generate-notes | |
| find artifacts -maxdepth 1 -type f -print0 | xargs -0 gh release upload "${GITHUB_REF_NAME}" --clobber |