Skip to content

actions should not run unnecessarily #32

actions should not run unnecessarily

actions should not run unnecessarily #32

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
platform: macos
targets: dmg
upload-path: dist/*/*.dmg
stable-glob: eagly-macos.*
# Pinned (not ubuntu-latest) only to fix the glibc baseline the app
# links against. FFmpeg is no longer a factor: a minimal, glibc-only
# libavcodec/libavutil is built and bundled inside the .deb (see
# scripts/build_linux_ffmpeg.sh + make_config.yaml), so the package is
# otherwise distro-independent.
- os: ubuntu-24.04
platform: linux
targets: deb
upload-path: dist/*/*.deb
stable-glob: eagly-linux.*
- os: windows-latest
platform: windows
targets: exe,msix
upload-path: |
dist/*/*.exe
dist/*/*.msix
stable-glob: eagly-windows*
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Read Flutter version from .fvmrc
id: fvm
shell: bash
run: echo "FLUTTER_VERSION=$(cat .fvmrc | python3 -c 'import sys,json;print(json.load(sys.stdin)[\"flutter\"])')" >> "$GITHUB_OUTPUT"
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm.outputs.FLUTTER_VERSION }}
cache: true
- name: Install Linux dependencies
if: matrix.platform == 'linux'
run: |
sudo apt-get update
# nasm: x86 SIMD for the minimal FFmpeg built by build_linux_ffmpeg.sh.
# patchelf: stamps $ORIGIN RUNPATH on the bundled FFmpeg .so files.
# libcurl4-openssl-dev: sentry-native (from sentry_flutter) links libcurl
# for its Linux crash-upload transport.
# No libav*-dev: the scrcpy decoder links the bundled FFmpeg, not the
# system one.
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev nasm patchelf libcurl4-openssl-dev
- name: Install macOS packaging dependencies
if: matrix.platform == 'macos'
shell: bash
run: |
mkdir -p "$HOME/.local"
npm install -g appdmg --prefix "$HOME/.local"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Install Windows packaging dependencies
if: matrix.platform == 'windows'
run: choco install innosetup --no-progress -y
# NOTE: Windows FFmpeg dev headers/import libs are downloaded by the
# "Prepare bundled mobile tools" step below (download_platform_tools.sh
# → download_windows_ffmpeg_dev), which forwards FFMPEG_INCLUDE_DIR /
# FFMPEG_LIB_DIR to GITHUB_ENV for the build step.
- name: Install Fastforge
shell: bash
run: dart pub global activate fastforge
- name: Prepare bundled mobile tools
shell: bash
env:
PLATFORM: ${{ matrix.platform }}
LIBIMOBILEDEVICE_MACOS_ARCHIVE: ${{ vars.LIBIMOBILEDEVICE_MACOS_ARCHIVE }}
LIBIMOBILEDEVICE_LINUX_ARCHIVE: ${{ vars.LIBIMOBILEDEVICE_LINUX_ARCHIVE }}
LIBIMOBILEDEVICE_WINDOWS_ARCHIVE: ${{ vars.LIBIMOBILEDEVICE_WINDOWS_ARCHIVE }}
LIBIMOBILEDEVICE_MACOS_DIR: ${{ vars.LIBIMOBILEDEVICE_MACOS_DIR }}
LIBIMOBILEDEVICE_LINUX_DIR: ${{ vars.LIBIMOBILEDEVICE_LINUX_DIR }}
LIBIMOBILEDEVICE_WINDOWS_DIR: ${{ vars.LIBIMOBILEDEVICE_WINDOWS_DIR }}
run: bash scripts/download_platform_tools.sh "$PLATFORM"
- name: Install dependencies
run: flutter pub get
- name: Package release artifacts
shell: bash
env:
PLATFORM: ${{ matrix.platform }}
TARGETS: ${{ matrix.targets }}
run: |
dart pub global run fastforge:main package \
--platform="$PLATFORM" \
--targets="$TARGETS" \
--artifact-name='eagly-{{build_name}}-{{platform}}{{#is_installer}}-setup{{/is_installer}}{{#ext}}.{{ext}}{{/ext}}'
- name: Create stable-named artifacts
shell: bash
env:
PLATFORM: ${{ matrix.platform }}
run: |
if [ "$PLATFORM" = "macos" ]; then
find dist -name "*.dmg" | head -1 | xargs -I{} cp {} eagly-macos.dmg
elif [ "$PLATFORM" = "linux" ]; then
find dist -name "*.deb" | head -1 | xargs -I{} cp {} eagly-linux.deb
elif [ "$PLATFORM" = "windows" ]; then
find dist -name "*.exe" | head -1 | xargs -I{} cp {} eagly-windows-setup.exe
find dist -name "*.msix" | head -1 | xargs -I{} cp {} eagly-windows.msix
fi
- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: eagly-${{ matrix.platform }}-${{ github.ref_name }}
path: ${{ matrix.upload-path }}
if-no-files-found: error
- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: |
${{ matrix.upload-path }}
${{ matrix.stable-glob }}