An open-source cross-platform alternative to AirDrop
ci: make release workflow working again
Tien Do Nama69a4b83ca74
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex a3f06e7d..0f5742f7 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -19,26 +19,9 @@ jobs:- name: Get version from pubspec.yamlid: get_versionrun: |- VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' pubspec.yaml)+ VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' app/pubspec.yaml)echo "version=$VERSION" >> $GITHUB_OUTPUT- - uses: subosito/flutter-action@v2- with:- flutter-version: ${{ env.FLUTTER_VERSION }}- channel: "stable"-- - name: Dependencies- run: flutter pub get-- - name: Build generated files- run: flutter pub run build_runner build -d-- - name: Upload updated lib files with generated code- uses: actions/upload-artifact@v3- with:- name: lib-files- path: ./lib/*-build_apk:needs: buildruns-on: ubuntu-22.04@@ -47,12 +30,6 @@ jobs:- name: Checkout repositoryuses: actions/checkout@v4- - name: Download generated files- uses: actions/download-artifact@v3- with:- name: lib-files- path: lib-- name: Copy files to env.APK_BUILD_DIRrun: |mkdir -p $APK_BUILD_DIR@@ -62,7 +39,7 @@ jobs:working-directory: ${{ env.APK_BUILD_DIR }}env:ENCODED_STRING: ${{ secrets.ANDROID_KEY_PROPERTIES }}- run: echo $ENCODED_STRING | base64 -di > android/key.properties+ run: echo $ENCODED_STRING | base64 -di > app/android/key.properties- name: Decode android-keystore.jks fileworking-directory: ${{ env.APK_BUILD_DIR }}@@ -82,18 +59,18 @@ jobs:flutter-version: ${{ env.FLUTTER_VERSION }}- name: Dependencies- working-directory: ${{ env.APK_BUILD_DIR }}+ working-directory: ${{ env.APK_BUILD_DIR }}/apprun: flutter pub get- name: Build APK- working-directory: ${{ env.APK_BUILD_DIR }}+ working-directory: ${{ env.APK_BUILD_DIR }}/apprun: flutter build apk- name: Upload APKuses: actions/upload-artifact@v3with:name: apk-result- path: ${{ env.APK_BUILD_DIR }}/build/app/outputs/flutter-apk/app-release.apk+ path: ${{ env.APK_BUILD_DIR }}/app/build/app/outputs/flutter-apk/app-release.apkbuild_tar:needs: build@@ -102,12 +79,6 @@ jobs:steps:- uses: actions/checkout@v4- - name: Download generated files- uses: actions/download-artifact@v3- with:- name: lib-files- path: lib-- name: Install dependenciesrun: |sudo apt-get update@@ -119,21 +90,23 @@ jobs:channel: "stable"- name: Dependencies+ working-directory: apprun: flutter pub get- name: Compile linux+ working-directory: apprun: flutter build linux- name: Create tar.gz archiverun: |- cd build/linux/x64/release/bundle+ cd app/build/linux/x64/release/bundletar -czvf ../../../../../result.tar.gz *- name: Upload tar.gz archiveuses: actions/upload-artifact@v3with:name: tar-gz-result- path: ./*.tar.gz+ path: ./app/*.tar.gzbuild_deb:needs: build@@ -142,12 +115,6 @@ jobs:steps:- uses: actions/checkout@v4- - name: Download generated files- uses: actions/download-artifact@v3- with:- name: lib-files- path: lib-- name: Install dependenciesrun: |sudo apt-get update@@ -165,13 +132,14 @@ jobs:run: echo 'export PATH="$PATH:$HOME/.pub-cache/bin"' >> ~/.bashrc- name: Build deb package+ working-directory: apprun: flutter_distributor package --platform linux --targets deb- name: Find deb fileid: find_debrun: |VERSION=${{ needs.build.outputs.version }}- DEB_PATH=$(find dist -name "localsend_app-$VERSION*-linux.deb")+ DEB_PATH=$(find app/dist -name "localsend_app-$VERSION*-linux.deb")echo "deb_path=$DEB_PATH" >> $GITHUB_OUTPUT- name: Check if deb file exists@@ -195,12 +163,6 @@ jobs:steps:- uses: actions/checkout@v4- - name: Download generated files- uses: actions/download-artifact@v3- with:- name: lib-files- path: lib-- name: Install dependenciesrun: |sudo apt-get update@@ -212,24 +174,26 @@ jobs:channel: "stable"- name: Dependencies+ working-directory: apprun: flutter pub get- name: Compile linux+ working-directory: apprun: flutter build linux- name: Copy compiled linux filesrun: |mkdir AppDir- cp -r build/linux/x64/release/bundle/* AppDir/+ cp -r app/build/linux/x64/release/bundle/* AppDir/- name: Copy logo to AppDirrun: |mkdir -p AppDir/usr/share/icons/hicolor/32x32/apps- cp assets/img/logo-32.png AppDir/usr/share/icons/hicolor/32x32/apps/localsend.png+ cp app/assets/img/logo-32.png AppDir/usr/share/icons/hicolor/32x32/apps/localsend.pngmkdir -p AppDir/usr/share/icons/hicolor/128x128/apps- cp assets/img/logo-128.png AppDir/usr/share/icons/hicolor/128x128/apps/localsend.png+ cp app/assets/img/logo-128.png AppDir/usr/share/icons/hicolor/128x128/apps/localsend.pngmkdir -p AppDir/usr/share/icons/hicolor/256x256/apps- cp assets/img/logo-256.png AppDir/usr/share/icons/hicolor/256x256/apps/localsend.png+ cp app/assets/img/logo-256.png AppDir/usr/share/icons/hicolor/256x256/apps/localsend.png- name: Build AppImageuses: AppImageCrafters/build-appimage@57c3bc6963f870ce3be103117de5b5e33ffbaeb6@@ -250,13 +214,8 @@ jobs:- name: Fix long file pathsrun: git config --system core.longpaths true- - uses: actions/checkout@v4-- - name: Download generated files- uses: actions/download-artifact@v3- with:- name: lib-files- path: lib+ - name: Checkout repository+ uses: actions/checkout@v4- uses: subosito/flutter-action@v2with:@@ -264,19 +223,22 @@ jobs:channel: "stable"- name: Dependencies+ working-directory: apprun: flutter pub get- name: Compile for Windows+ working-directory: apprun: flutter build windows- name: Zip compiled files+ working-directory: apprun: Compress-Archive -Path build/windows/runner/Release/* -DestinationPath LocalSend.zip- name: Upload zipuses: actions/upload-artifact@v3with:name: windows-zip-result- path: LocalSend.zip+ path: app/LocalSend.ziprelease:needs: [build, build_apk, build_tar, build_deb, build_appimage, build_windows_zip]