mirror of
https://github.com/localsend/localsend.git
synced 2026-06-23 04:10:07 +00:00
86adfd67af
https://github.blog/changelog/2025-01-15-github-actions-ubuntu-20-runner-image-brownout-dates-and-other-breaking-changes/#ubuntu-20-image-is-closing-down
68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
name: Build windows zip
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
FLUTTER_VERSION: "3.32.8"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
outputs:
|
|
version: ${{ steps.get_version.outputs.version }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- 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@v4
|
|
|
|
- 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@v4
|
|
with:
|
|
name: windows-zip-x86-64-result
|
|
path: app/LocalSend.zip
|