-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
232 changed files
with
12,156 additions
and
2,518 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,26 +63,25 @@ jobs: | |
flutter build apk --release \ | ||
--build-name=$VERSION_NAME \ | ||
--build-number=$GITHUB_RUN_NUMBER \ | ||
--dart-define=FLAVOR=release | ||
--flavor production | ||
# Build AAB | ||
flutter build appbundle --release \ | ||
--build-name=$VERSION_NAME \ | ||
--build-number=$GITHUB_RUN_NUMBER \ | ||
--dart-define=FLAVOR=release | ||
--flavor production | ||
- name: Rename APK and AAB | ||
run: | | ||
mv build/app/outputs/flutter-apk/app-release.apk "build/app/outputs/flutter-apk/${{ env.APP_NAME }}-${{ env.VERSION_NAME }}-signed.apk" | ||
mv build/app/outputs/bundle/release/app-release.aab "build/app/outputs/bundle/release/${{ env.APP_NAME }}-${{ env.VERSION_NAME }}-signed.aab" | ||
mkdir -p build/app/outputs/android_artifacts | ||
mv build/app/outputs/flutter-apk/app-production-release.apk "build/app/outputs/android_artifacts/${{ env.APP_NAME }}-Android-${{ env.VERSION_NAME }}.apk" | ||
mv build/app/outputs/bundle/productionRelease/app-production-release.aab "build/app/outputs/android_artifacts/${{ env.APP_NAME }}-Android-${{ env.VERSION_NAME }}.aab" | ||
- name: Archive Android artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ env.APP_NAME }}-Android-${{ env.VERSION_NAME }} | ||
path: | | ||
build/app/outputs/flutter-apk/${{ env.APP_NAME }}-${{ env.VERSION_NAME }}-signed.apk | ||
build/app/outputs/bundle/release/${{ env.APP_NAME }}-${{ env.VERSION_NAME }}-signed.aab | ||
path: build/app/outputs/android_artifacts/ | ||
|
||
build-windows: | ||
#Use windows-2019, latest(2022) causes MSVCP140.dll related crashes | ||
|
@@ -146,7 +145,7 @@ jobs: | |
VERSION_NAME=$(grep '^version:' pubspec.yaml | cut -d ':' -f2 | cut -d '+' -f1 | tr -d ' ') | ||
echo "PACKAGE_NAME=$APP_NAME-iOS-$VERSION_NAME" >> $GITHUB_ENV | ||
flutter build ipa --no-codesign --build-name=$VERSION_NAME --build-number=${{ github.run_number }} | ||
flutter build ipa --no-codesign --flavor production --build-name=$VERSION_NAME --build-number=${{ github.run_number }} | ||
- name: Create unsigned IPA | ||
run: | | ||
|
@@ -186,17 +185,17 @@ jobs: | |
VERSION_NAME=$(grep '^version:' pubspec.yaml | cut -d ':' -f2 | cut -d '+' -f1 | tr -d ' ') | ||
echo "PACKAGE_NAME=$APP_NAME-macOS-$VERSION_NAME" >> $GITHUB_ENV | ||
flutter build macos --build-name=$VERSION_NAME --build-number=${{ github.run_number }} | ||
flutter build macos --flavor production --build-name=$VERSION_NAME --build-number=${{ github.run_number }} | ||
- name: Create DMG file | ||
run: | | ||
hdiutil create -format UDZO -srcfolder build/macos/Build/Products/Release/fladder.app build/macos/Build/Products/Release/${{ env.PACKAGE_NAME }}.dmg | ||
hdiutil create -format UDZO -srcfolder build/macos/Build/Products/Release-production/fladder.app build/macos/Build/Products/Release-production/${{ env.PACKAGE_NAME }}.dmg | ||
- name: Archive macOS artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: ${{ env.PACKAGE_NAME }} | ||
path: build/macos/Build/Products/Release/${{ env.PACKAGE_NAME }}.dmg | ||
path: build/macos/Build/Products/Release-production/${{ env.PACKAGE_NAME }}.dmg | ||
|
||
build-linux: | ||
runs-on: ubuntu-latest | ||
|
@@ -220,7 +219,7 @@ jobs: | |
- name: Get packages | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y ninja-build libgtk-3-dev libmpv-dev | ||
sudo apt-get install -y ninja-build libgtk-3-dev libmpv-dev patchelf | ||
- name: Build Linux app | ||
run: | | ||
|
@@ -234,6 +233,14 @@ jobs: | |
--build-name=$VERSION_NAME \ | ||
--build-number=${{ github.run_number }} | ||
- name: Fix RPATH | ||
run: | | ||
for lib in "build/linux/x64/release/bundle/lib"/*.so; do | ||
[[ -f "$lib" && -n "$(patchelf --print-rpath "$lib")" ]] && \ | ||
patchelf --set-rpath '$ORIGIN' "$lib" | ||
done | ||
patchelf --set-rpath '$ORIGIN/lib' "build/linux/x64/release/bundle/Fladder" | ||
- name: Archive Linux artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -274,6 +281,7 @@ jobs: | |
path: build/web | ||
|
||
- name: Deploy to ghcr.io | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
uses: mr-smithers-excellent/docker-build-push@v6 | ||
with: | ||
image: fladder | ||
|
@@ -283,9 +291,11 @@ jobs: | |
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build Github pages web | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: flutter build web --base-href /${{ github.event.repository.name }}/ --release --build-number=$GITHUB_RUN_NUMBER | ||
|
||
- name: Deploy to GitHub Pages | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub Actions | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.