chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.41.9"
|
||||
|
||||
jobs:
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Setup Flutter SDK
|
||||
uses: flutter-actions/setup-flutter@v4
|
||||
with:
|
||||
version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: "stable"
|
||||
|
||||
- name: Dependencies (app)
|
||||
working-directory: app
|
||||
run: flutter pub get
|
||||
- name: Dependencies (cargokit - rust_builder)
|
||||
working-directory: app/rust_builder/cargokit/build_tool
|
||||
run: flutter pub get
|
||||
- name: Remove gen directory (app)
|
||||
working-directory: app
|
||||
run: rm -rf lib/gen
|
||||
- name: Check format (app)
|
||||
working-directory: app
|
||||
run: dart format --set-exit-if-changed lib test
|
||||
|
||||
- name: Dependencies (common)
|
||||
working-directory: common
|
||||
run: dart pub get
|
||||
- name: Check format (common)
|
||||
working-directory: common
|
||||
run: dart format --set-exit-if-changed lib test
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Setup Flutter SDK
|
||||
uses: flutter-actions/setup-flutter@v4
|
||||
with:
|
||||
version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: "stable"
|
||||
|
||||
- name: Dependencies (app)
|
||||
working-directory: app
|
||||
run: flutter pub get
|
||||
- name: Dependencies (cargokit - rust_builder)
|
||||
working-directory: app/rust_builder/cargokit/build_tool
|
||||
run: flutter pub get
|
||||
- name: Analyze (app)
|
||||
working-directory: app
|
||||
run: flutter analyze
|
||||
- name: Test (app)
|
||||
working-directory: app
|
||||
run: flutter test
|
||||
|
||||
- name: Dependencies (common)
|
||||
working-directory: common
|
||||
run: dart pub get
|
||||
- name: Analyze (common)
|
||||
working-directory: common
|
||||
run: dart analyze
|
||||
- name: Test (common)
|
||||
working-directory: common
|
||||
run: dart test
|
||||
|
||||
packaging:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Extract version from pubspec.yaml
|
||||
id: pubspec_version
|
||||
run: |
|
||||
VERSION=$(grep '^version: ' app/pubspec.yaml | sed 's/version: //' | sed 's/\+.*//')
|
||||
echo "Pubspec version is $VERSION"
|
||||
echo "pubspec_version=$VERSION" >> $GITHUB_ENV
|
||||
|
||||
- name: Extract version from Inno Setup configuration
|
||||
id: inno_version
|
||||
run: |
|
||||
VERSION=$(grep '#define MyAppVersion ' scripts/compile_windows_exe-inno.iss | sed 's/#define MyAppVersion "//' | sed 's/"//')
|
||||
echo "Inno Setup version is $VERSION"
|
||||
echo "inno_version=$VERSION" >> $GITHUB_ENV
|
||||
|
||||
- name: Compare pubspec and Inno Setup versions
|
||||
run: |
|
||||
if [ "$pubspec_version" != "$inno_version" ]; then
|
||||
echo "Version mismatch detected!"
|
||||
exit 1
|
||||
else
|
||||
echo "Versions match."
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
name: Delete old workflow runs
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
days:
|
||||
description: 'Number of days.'
|
||||
required: true
|
||||
default: 30
|
||||
minimum_runs:
|
||||
description: 'The minimum runs to keep for each workflow.'
|
||||
required: true
|
||||
default: 6
|
||||
delete_workflow_pattern:
|
||||
description: 'The name or filename of the workflow. if not set then it will target all workflows.'
|
||||
required: false
|
||||
delete_workflow_by_state_pattern:
|
||||
description: 'Remove workflow by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually'
|
||||
required: true
|
||||
default: "All"
|
||||
type: choice
|
||||
options:
|
||||
- "All"
|
||||
- active
|
||||
- deleted
|
||||
- disabled_inactivity
|
||||
- disabled_manually
|
||||
delete_run_by_conclusion_pattern:
|
||||
description: 'Remove workflow by conclusion: action_required, cancelled, failure, skipped, success'
|
||||
required: true
|
||||
default: "All"
|
||||
type: choice
|
||||
options:
|
||||
- "All"
|
||||
- action_required
|
||||
- cancelled
|
||||
- failure
|
||||
- skipped
|
||||
- success
|
||||
dry_run:
|
||||
description: 'Only log actions, do not perform any delete operations.'
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
del_runs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Delete workflow runs
|
||||
uses: Mattraks/delete-workflow-runs@998b89248266543a3c7827da0a73cf49d0131222 # 2.0.5
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
repository: ${{ github.repository }}
|
||||
retain_days: ${{ github.event.inputs.days }}
|
||||
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}
|
||||
delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }}
|
||||
delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }}
|
||||
delete_run_by_conclusion_pattern: ${{ github.event.inputs.delete_run_by_conclusion_pattern }}
|
||||
dry_run: ${{ github.event.inputs.dry_run }}
|
||||
@@ -0,0 +1,86 @@
|
||||
name: Compile APK
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.41.9"
|
||||
RUST_VERSION: "1.84.1"
|
||||
APK_BUILD_DIR: "/tmp/build"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
version: ${{ steps.get_version.outputs.version }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Get version from pubspec.yaml
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' app/pubspec.yaml)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
build_apk:
|
||||
needs: build
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Remove proprietary dependencies
|
||||
run: sh scripts/remove_proprietary_dependencies.sh
|
||||
|
||||
- name: Copy files to env.APK_BUILD_DIR
|
||||
run: |
|
||||
mkdir -p $APK_BUILD_DIR
|
||||
cp -r . $APK_BUILD_DIR
|
||||
|
||||
- name: Decode key.properties file
|
||||
working-directory: ${{ env.APK_BUILD_DIR }}
|
||||
env:
|
||||
ENCODED_STRING: ${{ secrets.ANDROID_KEY_PROPERTIES }}
|
||||
run: echo $ENCODED_STRING | base64 -di > app/android/key.properties
|
||||
|
||||
- name: Decode android-keystore.jks file
|
||||
working-directory: ${{ env.APK_BUILD_DIR }}
|
||||
env:
|
||||
ENCODED_STRING: ${{ secrets.ANDROID_KEY_STORE }}
|
||||
run: mkdir secrets && echo $ENCODED_STRING | base64 -di > secrets/android-keystore.jks
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Install Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: ${{ env.RUST_VERSION }}
|
||||
|
||||
- name: Dependencies
|
||||
working-directory: ${{ env.APK_BUILD_DIR }}/app
|
||||
run: flutter pub get
|
||||
|
||||
- name: Build APK
|
||||
working-directory: ${{ env.APK_BUILD_DIR }}/app
|
||||
run: flutter build apk --split-per-abi
|
||||
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: apk-result
|
||||
path: |
|
||||
${{ env.APK_BUILD_DIR }}/app/build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
|
||||
${{ env.APK_BUILD_DIR }}/app/build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
|
||||
${{ env.APK_BUILD_DIR }}/app/build/app/outputs/flutter-apk/app-x86_64-release.apk
|
||||
@@ -0,0 +1,72 @@
|
||||
name: Build arm64 AppImage
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.41.9"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
version: ${{ steps.get_version.outputs.version }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Get version from pubspec.yaml
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' app/pubspec.yaml)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
# Manage the Flutter version on the self-hosted runner manually!
|
||||
# Flutter currently doesn't provide Linux ARM64 binaries.
|
||||
build_appimage_arm_64:
|
||||
needs: build
|
||||
runs-on: [self-hosted, linux, arm64]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev libfuse2
|
||||
|
||||
- name: Dependencies
|
||||
working-directory: app
|
||||
run: flutter pub get
|
||||
|
||||
- name: Compile linux
|
||||
working-directory: app
|
||||
run: flutter build linux
|
||||
|
||||
- name: Copy compiled linux files
|
||||
run: |
|
||||
mkdir AppDir
|
||||
cp -r app/build/linux/arm64/release/bundle/* AppDir/
|
||||
|
||||
- name: Copy logo to AppDir
|
||||
run: |
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/32x32/apps
|
||||
cp app/assets/img/logo-32.png AppDir/usr/share/icons/hicolor/32x32/apps/localsend.png
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/128x128/apps
|
||||
cp app/assets/img/logo-128.png AppDir/usr/share/icons/hicolor/128x128/apps/localsend.png
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
|
||||
cp app/assets/img/logo-256.png AppDir/usr/share/icons/hicolor/256x256/apps/localsend.png
|
||||
|
||||
- name: Copy Recipe to correct location
|
||||
run: cp scripts/appimage/AppImageBuilder_arm_64.yml AppImageBuilder.yml
|
||||
|
||||
- name: Build AppImage
|
||||
uses: AppImageCrafters/build-appimage@57c3bc6963f870ce3be103117de5b5e33ffbaeb6
|
||||
with:
|
||||
recipe: ./AppImageBuilder.yml
|
||||
|
||||
- name: Upload AppImage file
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: appimage-arm-64-result
|
||||
path: ./*.AppImage
|
||||
@@ -0,0 +1,101 @@
|
||||
name: Linux build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.41.9"
|
||||
APK_BUILD_DIR: "/tmp/build"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
version: ${{ steps.get_version.outputs.version }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Get version from pubspec.yaml
|
||||
id: get_version
|
||||
working-directory: app
|
||||
run: |
|
||||
VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' pubspec.yaml)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: "stable"
|
||||
|
||||
- name: Dependencies
|
||||
working-directory: app
|
||||
run: flutter pub get
|
||||
|
||||
- name: Build generated files
|
||||
working-directory: app
|
||||
run: dart run build_runner build -d
|
||||
|
||||
- name: Upload updated lib files with generated code
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: lib-files
|
||||
path: ./app/lib/*
|
||||
|
||||
build_appimage:
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Download generated files
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: lib-files
|
||||
path: app/lib
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev libfuse2
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: "stable"
|
||||
|
||||
- name: Dependencies
|
||||
working-directory: app
|
||||
run: flutter pub get
|
||||
|
||||
- name: Compile linux
|
||||
working-directory: app
|
||||
run: flutter build linux
|
||||
|
||||
- name: Copy compiled linux files
|
||||
working-directory: app
|
||||
run: |
|
||||
mkdir AppDir
|
||||
cp -r build/linux/x64/release/bundle/* AppDir/
|
||||
|
||||
- name: Copy logo to AppDir
|
||||
working-directory: app
|
||||
run: |
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/32x32/apps
|
||||
cp assets/img/logo-32.png AppDir/usr/share/icons/hicolor/32x32/apps/localsend.png
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/128x128/apps
|
||||
cp assets/img/logo-128.png AppDir/usr/share/icons/hicolor/128x128/apps/localsend.png
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
|
||||
cp assets/img/logo-256.png AppDir/usr/share/icons/hicolor/256x256/apps/localsend.png
|
||||
|
||||
- name: Build AppImage
|
||||
uses: AppImageCrafters/build-appimage@57c3bc6963f870ce3be103117de5b5e33ffbaeb6
|
||||
with:
|
||||
recipe: ./app/AppImageBuilder.yml
|
||||
|
||||
- name: Upload AppImage file
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: appimage-result
|
||||
path: ./app/*.AppImage
|
||||
@@ -0,0 +1,575 @@
|
||||
name: Release Draft
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.41.9"
|
||||
RUST_VERSION: "1.84.1"
|
||||
APK_BUILD_DIR: "/tmp/build"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
version: ${{ steps.get_version.outputs.version }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Get version from pubspec.yaml
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' app/pubspec.yaml)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
build_apk:
|
||||
needs: build
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Remove proprietary dependencies
|
||||
run: sh scripts/remove_proprietary_dependencies.sh
|
||||
|
||||
- name: Copy files to env.APK_BUILD_DIR
|
||||
run: |
|
||||
mkdir -p $APK_BUILD_DIR
|
||||
cp -r . $APK_BUILD_DIR
|
||||
|
||||
- name: Decode key.properties file
|
||||
working-directory: ${{ env.APK_BUILD_DIR }}
|
||||
env:
|
||||
ENCODED_STRING: ${{ secrets.ANDROID_KEY_PROPERTIES }}
|
||||
run: echo $ENCODED_STRING | base64 -di > app/android/key.properties
|
||||
|
||||
- name: Decode android-keystore.jks file
|
||||
working-directory: ${{ env.APK_BUILD_DIR }}
|
||||
env:
|
||||
ENCODED_STRING: ${{ secrets.ANDROID_KEY_STORE }}
|
||||
run: mkdir secrets && echo $ENCODED_STRING | base64 -di > secrets/android-keystore.jks
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Install Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: ${{ env.RUST_VERSION }}
|
||||
|
||||
- name: Check rust-toolchain.toml
|
||||
working-directory: ${{ env.APK_BUILD_DIR }}/app
|
||||
run: rustup show
|
||||
|
||||
- name: Dependencies
|
||||
working-directory: ${{ env.APK_BUILD_DIR }}/app
|
||||
run: flutter pub get
|
||||
|
||||
- name: Build APK
|
||||
working-directory: ${{ env.APK_BUILD_DIR }}/app
|
||||
run: flutter build apk --split-per-abi
|
||||
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: apk-result
|
||||
path: |
|
||||
${{ env.APK_BUILD_DIR }}/app/build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
|
||||
${{ env.APK_BUILD_DIR }}/app/build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
|
||||
${{ env.APK_BUILD_DIR }}/app/build/app/outputs/flutter-apk/app-x86_64-release.apk
|
||||
|
||||
build_tar_x86_64:
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: "stable"
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: ${{ env.RUST_VERSION }}
|
||||
|
||||
- name: Check rust-toolchain.toml
|
||||
working-directory: app
|
||||
run: rustup show
|
||||
|
||||
- name: Dependencies
|
||||
working-directory: app
|
||||
run: flutter pub get
|
||||
|
||||
- name: Compile linux
|
||||
working-directory: app
|
||||
run: flutter build linux
|
||||
|
||||
- name: Create tar.gz archive
|
||||
run: |
|
||||
cd app/build/linux/x64/release/bundle
|
||||
tar -czvf ../../../../../result.tar.gz *
|
||||
|
||||
- name: Upload tar.gz archive
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: tar-gz-x86-64-result
|
||||
path: ./app/*.tar.gz
|
||||
|
||||
# Manage the Flutter version on the self-hosted runner manually!
|
||||
# Flutter currently doesn't provide Linux ARM64 binaries.
|
||||
build_tar_arm_64:
|
||||
needs: build
|
||||
runs-on: [ self-hosted, linux, arm64 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev
|
||||
|
||||
- name: Dependencies
|
||||
working-directory: app
|
||||
run: flutter pub get
|
||||
|
||||
- name: Compile linux
|
||||
working-directory: app
|
||||
run: flutter build linux
|
||||
|
||||
- name: Create tar.gz archive
|
||||
run: |
|
||||
cd app/build/linux/arm64/release/bundle
|
||||
tar -czvf ../../../../../result.tar.gz *
|
||||
|
||||
- name: Upload tar.gz archive
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: tar-gz-arm-64-result
|
||||
path: ./app/*.tar.gz
|
||||
|
||||
build_deb_x86_64:
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: "stable"
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: ${{ env.RUST_VERSION }}
|
||||
|
||||
- name: Check rust-toolchain.toml
|
||||
working-directory: app
|
||||
run: rustup show
|
||||
|
||||
- name: Enable dart_distributor
|
||||
run: dart pub global activate flutter_distributor
|
||||
|
||||
- name: Update PATH
|
||||
run: echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> ~/.bashrc
|
||||
|
||||
- name: Build deb package
|
||||
working-directory: app
|
||||
run: flutter_distributor package --platform linux --targets deb
|
||||
|
||||
- name: Find deb file
|
||||
id: find_deb
|
||||
run: |
|
||||
VERSION=${{ needs.build.outputs.version }}
|
||||
DEB_PATH=$(find app/dist -name "localsend_app-$VERSION*-linux.deb")
|
||||
echo "deb_path=$DEB_PATH" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check if deb file exists
|
||||
id: check_file
|
||||
run: |
|
||||
if [[ ! -f "${{ steps.find_deb.outputs.deb_path }}" ]]; then
|
||||
echo "File not found: ${{ steps.find_deb.outputs.deb_path }}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload deb file
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: deb-x86-64-result
|
||||
path: ${{ steps.find_deb.outputs.deb_path }}
|
||||
|
||||
# Manage the Flutter version on the self-hosted runner manually!
|
||||
# Flutter currently doesn't provide Linux ARM64 binaries.
|
||||
build_deb_arm_64:
|
||||
needs: build
|
||||
runs-on: [ self-hosted, linux, arm64 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev
|
||||
|
||||
- name: Enable dart_distributor
|
||||
run: dart pub global activate flutter_distributor
|
||||
|
||||
- name: Build deb package
|
||||
working-directory: app
|
||||
run: PATH="$PATH:$HOME/.pub-cache/bin" flutter_distributor package --platform linux --targets deb
|
||||
|
||||
- name: Find deb file
|
||||
id: find_deb
|
||||
run: |
|
||||
VERSION=${{ needs.build.outputs.version }}
|
||||
DEB_PATH=$(find app/dist -name "localsend_app-$VERSION*-linux.deb")
|
||||
echo "deb_path=$DEB_PATH" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check if deb file exists
|
||||
id: check_file
|
||||
run: |
|
||||
if [[ ! -f "${{ steps.find_deb.outputs.deb_path }}" ]]; then
|
||||
echo "File not found: ${{ steps.find_deb.outputs.deb_path }}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload deb file
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: deb-arm-64-result
|
||||
path: ${{ steps.find_deb.outputs.deb_path }}
|
||||
|
||||
build_appimage_x86_64:
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev libfuse2
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: "stable"
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: ${{ env.RUST_VERSION }}
|
||||
|
||||
- name: Check rust-toolchain.toml
|
||||
working-directory: app
|
||||
run: rustup show
|
||||
|
||||
- name: Dependencies
|
||||
working-directory: app
|
||||
run: flutter pub get
|
||||
|
||||
- name: Compile linux
|
||||
working-directory: app
|
||||
run: flutter build linux
|
||||
|
||||
- name: Copy compiled linux files
|
||||
run: |
|
||||
mkdir AppDir
|
||||
cp -r app/build/linux/x64/release/bundle/* AppDir/
|
||||
|
||||
- name: Copy logo to AppDir
|
||||
run: |
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/32x32/apps
|
||||
cp app/assets/img/logo-32.png AppDir/usr/share/icons/hicolor/32x32/apps/localsend.png
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/128x128/apps
|
||||
cp app/assets/img/logo-128.png AppDir/usr/share/icons/hicolor/128x128/apps/localsend.png
|
||||
mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
|
||||
cp app/assets/img/logo-256.png AppDir/usr/share/icons/hicolor/256x256/apps/localsend.png
|
||||
|
||||
- name: Copy Recipe to correct location
|
||||
run: cp scripts/appimage/AppImageBuilder_x86_64.yml AppImageBuilder.yml
|
||||
|
||||
- name: Build AppImage
|
||||
uses: AppImageCrafters/build-appimage@57c3bc6963f870ce3be103117de5b5e33ffbaeb6
|
||||
with:
|
||||
recipe: ./AppImageBuilder.yml
|
||||
|
||||
- name: Upload AppImage file
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: appimage-x86-64-result
|
||||
path: ./*.AppImage
|
||||
|
||||
build_windows_zip_x86_64:
|
||||
needs: build
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Fix long file paths
|
||||
run: git config --system core.longpaths true
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: "stable"
|
||||
|
||||
- name: Dependencies
|
||||
working-directory: app
|
||||
run: flutter pub get
|
||||
|
||||
- name: Compile for Windows
|
||||
working-directory: app
|
||||
run: flutter build windows
|
||||
|
||||
- name: Create empty settings.json
|
||||
working-directory: app
|
||||
run: echo {} > build/windows/x64/runner/Release/settings.json
|
||||
|
||||
- name: Add DLL files
|
||||
working-directory: app
|
||||
run: |
|
||||
Copy-Item ../scripts/windows/x64/msvcp140.dll build/windows/x64/runner/Release/
|
||||
Copy-Item ../scripts/windows/x64/vcruntime140.dll build/windows/x64/runner/Release/
|
||||
Copy-Item ../scripts/windows/x64/vcruntime140_1.dll build/windows/x64/runner/Release/
|
||||
|
||||
- name: Zip compiled files
|
||||
working-directory: app
|
||||
run: Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath LocalSend.zip
|
||||
|
||||
- name: Upload zip
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: windows-zip-x86-64-result
|
||||
path: app/LocalSend.zip
|
||||
|
||||
release:
|
||||
needs:
|
||||
- build
|
||||
- build_apk
|
||||
- build_tar_x86_64
|
||||
- build_tar_arm_64
|
||||
- build_deb_x86_64
|
||||
- build_deb_arm_64
|
||||
- build_appimage_x86_64
|
||||
- build_windows_zip_x86_64
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Draft release
|
||||
id: draft_release
|
||||
uses: release-drafter/release-drafter@v6
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag: v${{ needs.build.outputs.version }}
|
||||
name: v${{ needs.build.outputs.version }}
|
||||
|
||||
# APK
|
||||
- name: Download apk file
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: apk-result
|
||||
path: apk-result
|
||||
|
||||
- name: Copy apk file to root
|
||||
run: cp apk-result/*.apk .
|
||||
|
||||
- name: Upload Release Asset (arm32v7)
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.draft_release.outputs.upload_url }}
|
||||
asset_path: app-armeabi-v7a-release.apk
|
||||
asset_name: LocalSend-${{ needs.build.outputs.version }}-android-arm32v7.apk
|
||||
asset_content_type: application/vnd.android.package-archive
|
||||
|
||||
- name: Upload Release Asset (arm64v8)
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.draft_release.outputs.upload_url }}
|
||||
asset_path: app-arm64-v8a-release.apk
|
||||
asset_name: LocalSend-${{ needs.build.outputs.version }}-android-arm64v8.apk
|
||||
asset_content_type: application/vnd.android.package-archive
|
||||
|
||||
- name: Upload Release Asset (x64)
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.draft_release.outputs.upload_url }}
|
||||
asset_path: app-x86_64-release.apk
|
||||
asset_name: LocalSend-${{ needs.build.outputs.version }}-android-x64.apk
|
||||
asset_content_type: application/vnd.android.package-archive
|
||||
|
||||
# TAR.GZ (x86_64)
|
||||
- name: Download tar.gz file
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: tar-gz-x86-64-result
|
||||
path: tar-gz-x86-64-result
|
||||
|
||||
- name: List files in tar.gz-directory
|
||||
run: ls -l tar-gz-x86-64-result
|
||||
|
||||
- name: Copy tar.gz file to root
|
||||
run: cp tar-gz-x86-64-result/* result.tar.gz
|
||||
|
||||
- name: Upload Release Asset (tar.gz)
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.draft_release.outputs.upload_url }}
|
||||
asset_path: result.tar.gz
|
||||
asset_name: LocalSend-${{ needs.build.outputs.version }}-linux-x86-64.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
# TAR.GZ (arm_64)
|
||||
- name: Download tar.gz file
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: tar-gz-arm-64-result
|
||||
path: tar-gz-arm-64-result
|
||||
|
||||
- name: List files in tar.gz-directory
|
||||
run: ls -l tar-gz-arm-64-result
|
||||
|
||||
- name: Copy tar.gz file to root
|
||||
run: cp tar-gz-arm-64-result/* result.tar.gz
|
||||
|
||||
- name: Upload Release Asset (tar.gz)
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.draft_release.outputs.upload_url }}
|
||||
asset_path: result.tar.gz
|
||||
asset_name: LocalSend-${{ needs.build.outputs.version }}-linux-arm-64.tar.gz
|
||||
asset_content_type: application/gzip
|
||||
|
||||
# DEB (x86_64)
|
||||
- name: Download deb file
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: deb-x86-64-result
|
||||
path: deb-x86-64-result
|
||||
|
||||
- name: Copy deb file to root
|
||||
run: cp deb-x86-64-result/*.deb result.deb
|
||||
|
||||
- name: Upload Release Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.draft_release.outputs.upload_url }}
|
||||
asset_path: result.deb
|
||||
asset_name: LocalSend-${{ needs.build.outputs.version }}-linux-x86-64.deb
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
|
||||
# DEB (arm_64)
|
||||
- name: Download deb file
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: deb-arm-64-result
|
||||
path: deb-arm-64-result
|
||||
|
||||
- name: Copy deb file to root
|
||||
run: cp deb-arm-64-result/*.deb result.deb
|
||||
|
||||
- name: Upload Release Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.draft_release.outputs.upload_url }}
|
||||
asset_path: result.deb
|
||||
asset_name: LocalSend-${{ needs.build.outputs.version }}-linux-arm-64.deb
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
|
||||
# APPIMAGE (x86_64)
|
||||
- name: Download AppImage file
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: appimage-x86-64-result
|
||||
path: appimage-x86-64-result
|
||||
|
||||
- name: List files in appimage-directory
|
||||
run: ls -l appimage-x86-64-result
|
||||
|
||||
- name: Copy AppImage file to root
|
||||
run: |
|
||||
for file in appimage-x86-64-result/*; do
|
||||
if [[ $file == *.AppImage && $file != *.AppImage.zsync ]]; then
|
||||
cp "$file" result.AppImage
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Upload Release Asset (AppImage)
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.draft_release.outputs.upload_url }}
|
||||
asset_path: result.AppImage
|
||||
asset_name: LocalSend-${{ needs.build.outputs.version }}-linux-x86-64.AppImage
|
||||
asset_content_type: application/x-appimage
|
||||
|
||||
# WINDOWS ZIP (x86_64)
|
||||
- name: Download windows zip file
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: windows-zip-x86-64-result
|
||||
path: windows-zip-x86-64-result
|
||||
|
||||
- name: Copy zip file to root
|
||||
run: cp windows-zip-x86-64-result/*.zip result.zip
|
||||
|
||||
- name: Upload Release Asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.draft_release.outputs.upload_url }}
|
||||
asset_path: result.zip
|
||||
asset_name: LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.zip
|
||||
asset_content_type: application/zip
|
||||
@@ -0,0 +1,75 @@
|
||||
name: Build arm64 deb
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.41.9"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
version: ${{ steps.get_version.outputs.version }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Get version from pubspec.yaml
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' app/pubspec.yaml)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
# Manage the Flutter version on the self-hosted runner manually!
|
||||
# Flutter currently doesn't provide Linux ARM64 binaries.
|
||||
build_deb_arm_64:
|
||||
needs: build
|
||||
runs-on: [self-hosted, linux, arm64]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev
|
||||
|
||||
- name: Enable dart_distributor
|
||||
run: dart pub global activate flutter_distributor
|
||||
|
||||
- name: Build deb package
|
||||
working-directory: app
|
||||
run: PATH="$PATH:$HOME/.pub-cache/bin" flutter_distributor package --platform linux --targets deb
|
||||
|
||||
- name: Find deb file
|
||||
id: find_deb
|
||||
run: |
|
||||
VERSION=${{ needs.build.outputs.version }}
|
||||
DEB_PATH=$(find app/dist -name "localsend_app-$VERSION*-linux.deb")
|
||||
echo "deb_path=$DEB_PATH" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check if deb file exists
|
||||
id: check_file
|
||||
run: |
|
||||
if [[ ! -f "${{ steps.find_deb.outputs.deb_path }}" ]]; then
|
||||
echo "File not found: ${{ steps.find_deb.outputs.deb_path }}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Remove this when: https://github.com/leanflutter/flutter_distributor/pull/150 is merged
|
||||
- name: Update Architecture
|
||||
run: |
|
||||
mkdir temp
|
||||
cd temp
|
||||
ar x ../${{ steps.find_deb.outputs.deb_path }}
|
||||
tar xJf control.tar.xz --overwrite
|
||||
sed -i '/Architecture:/c\Architecture: arm64' ./control
|
||||
tar cJf control.tar.xz control postinst postrm
|
||||
ar rcs ../${{ steps.find_deb.outputs.deb_path }} debian-binary control.tar.xz data.tar.xz
|
||||
|
||||
- name: Upload deb file
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: deb-arm-64-result
|
||||
path: ${{ steps.find_deb.outputs.deb_path }}
|
||||
@@ -0,0 +1,55 @@
|
||||
name: Build arm64 tar
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.41.9"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
version: ${{ steps.get_version.outputs.version }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Get version from pubspec.yaml
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' app/pubspec.yaml)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
# Manage the Flutter version on the self-hosted runner manually!
|
||||
# Flutter currently doesn't provide Linux ARM64 binaries.
|
||||
build_tar_arm_64:
|
||||
needs: build
|
||||
runs-on: [self-hosted, linux, arm64]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y clang cmake libgtk-3-dev ninja-build libayatana-appindicator3-dev
|
||||
|
||||
- name: Dependencies
|
||||
working-directory: app
|
||||
run: flutter pub get
|
||||
|
||||
- name: Compile linux
|
||||
working-directory: app
|
||||
run: flutter build linux
|
||||
|
||||
- name: Create tar.gz archive
|
||||
run: |
|
||||
cd app/build/linux/arm64/release/bundle
|
||||
tar -czvf ../../../../../result.tar.gz *
|
||||
|
||||
- name: Upload tar.gz archive
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: tar-gz-arm-64-result
|
||||
path: ./app/*.tar.gz
|
||||
@@ -0,0 +1,81 @@
|
||||
name: Build rpm package
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.41.9"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
version: ${{ steps.get_version.outputs.version }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Get version from pubspec.yaml
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' app/pubspec.yaml)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
build_rpm:
|
||||
runs-on: ubuntu-latest
|
||||
container: fedora:38
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install dependencies
|
||||
run: sudo dnf install -y clang cmake gtk3-devel ninja-build libappindicator-gtk3-devel jq findutils which git patchelf rpm-build
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: "stable"
|
||||
|
||||
- name: Configure safe directory for Git
|
||||
run: git config --global --add safe.directory "/opt/hostedtoolcache/flutter/stable-${{ env.FLUTTER_VERSION }}-x64"
|
||||
|
||||
# - name: Configure safe directory for Git (pub-cache)
|
||||
# run: git config --global --add safe.directory "/opt/hostedtoolcache/flutter/stable-${{ env.FLUTTER_VERSION }}-x64/.pub-cache"
|
||||
|
||||
- name: Get flutter path
|
||||
run: which flutter
|
||||
|
||||
- name: Get dart path
|
||||
run: which dart
|
||||
|
||||
- name: Enable dart_distributor
|
||||
run: PUB_CACHE=/opt/hostedtoolcache/flutter/stable-${{ env.FLUTTER_VERSION }}-x64/.pub-cache dart pub global activate flutter_distributor
|
||||
|
||||
- name: Debugging PATH and flutter_distributor
|
||||
run: |
|
||||
echo "PATH: $PATH"
|
||||
command -v flutter_distributor || echo "flutter_distributor not found"
|
||||
|
||||
- name: Build rpm package
|
||||
working-directory: app
|
||||
run: FLUTTER_ROOT=/opt/hostedtoolcache/flutter/stable-${{ env.FLUTTER_VERSION }}-x64 flutter_distributor package --platform linux --targets rpm
|
||||
|
||||
- name: Find rpm file
|
||||
id: find_rpm
|
||||
run: |
|
||||
VERSION=${{ needs.build.outputs.version }}
|
||||
RPM_PATH=$(find app/dist -name "localsend_app-$VERSION*-linux.rpm")
|
||||
echo "rpm_path=$RPM_PATH" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check if rpm file exists
|
||||
id: check_file
|
||||
run: |
|
||||
if [[ ! -f "${{ steps.find_rpm.outputs.rpm_path }}" ]]; then
|
||||
echo "File not found: ${{ steps.find_rpm.outputs.rpm_path }}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload rpm file
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: rpm-result
|
||||
path: ${{ steps.find_rpm.outputs.rpm_path }}
|
||||
@@ -0,0 +1,67 @@
|
||||
name: Build windows zip
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FLUTTER_VERSION: "3.41.9"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
version: ${{ steps.get_version.outputs.version }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Get version from pubspec.yaml
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' app/pubspec.yaml)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
build_windows_zip:
|
||||
needs: build
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Fix long file paths
|
||||
run: git config --system core.longpaths true
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: "stable"
|
||||
|
||||
- name: Dependencies
|
||||
working-directory: app
|
||||
run: flutter pub get
|
||||
|
||||
- name: Compile for Windows
|
||||
working-directory: app
|
||||
run: flutter build windows
|
||||
|
||||
- name: Create empty settings.json
|
||||
working-directory: app
|
||||
run: echo {} > build/windows/x64/runner/Release/settings.json
|
||||
|
||||
- name: Add DLL files
|
||||
working-directory: app
|
||||
run: |
|
||||
Copy-Item ../scripts/windows/x64/msvcp140.dll build/windows/x64/runner/Release/
|
||||
Copy-Item ../scripts/windows/x64/vcruntime140.dll build/windows/x64/runner/Release/
|
||||
Copy-Item ../scripts/windows/x64/vcruntime140_1.dll build/windows/x64/runner/Release/
|
||||
|
||||
- name: Zip compiled files
|
||||
working-directory: app
|
||||
run: Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath LocalSend.zip
|
||||
|
||||
- name: Upload zip
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: windows-zip-x86-64-result
|
||||
path: app/LocalSend.zip
|
||||
@@ -0,0 +1,13 @@
|
||||
name: Publish to WinGet
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: vedantmgoyal9/winget-releaser@main
|
||||
with:
|
||||
identifier: LocalSend.LocalSend
|
||||
token: ${{ secrets.WINGET_TOKEN }}
|
||||
Reference in New Issue
Block a user