Fix android build #310
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
name: Flutter build | |
on: | |
push: | |
branches: | |
- "*" | |
tags: | |
- stable | |
- nightly | |
release: | |
types: [published] | |
pull_request: | |
jobs: | |
build-apk: | |
concurrency: ci-${{ github.ref }} | |
defaults: | |
run: | |
working-directory: app | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: ⬆️ Checkout | |
uses: actions/checkout@v4 | |
- name: 🔧 Setup java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- uses: subosito/flutter-action@v2.16.0 | |
with: | |
flutter-version-file: app/pubspec.yaml | |
- name: 📦 Get dependencies | |
run: | | |
flutter clean | |
flutter pub get | |
flutter doctor -v | |
- name: Build nessesary files | |
working-directory: ./ | |
run: | | |
cd tools | |
dart pub get | |
cd .. | |
dart run tools/generate.dart | |
- name: Import files | |
if: ${{ github.event_name != 'pull_request' }} | |
env: | |
KEY_JKS: ${{ secrets.KEY_JKS }} | |
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }} | |
run: | | |
cd android | |
if [[ -n "$KEY_PROPERTIES" ]] ; then echo "$KEY_PROPERTIES" | base64 --decode > key.properties ; fi | |
if [[ -n "$KEY_JKS" ]] ; then echo "$KEY_JKS" | base64 --decode > key.jks ; fi | |
#- run: flutter test | |
- name: 🏭 Build nightly | |
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }} | |
run: | | |
flutter build apk -v --release --flavor nightly --dart-define=flavor=nightly | |
cp build/app/outputs/flutter-apk/app-nightly-release.apk linwood-setonix-android.apk | |
- name: 🏭 Build production | |
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }} | |
run: | | |
flutter build apk -v --release --flavor production | |
cp build/app/outputs/flutter-apk/app-production-release.apk linwood-setonix-android.apk | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: apk-build | |
path: app/linwood-setonix-android.apk | |
- name: 🏭 Build architecture nightly | |
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }} | |
run: | | |
flutter build apk -v --release --target-platform android-arm,android-arm64,android-x64 --split-per-abi --flavor nightly --dart-define=flavor=nightly | |
cp build/app/outputs/flutter-apk/app-armeabi-v7a-nightly-release.apk linwood-setonix-android-arm.apk | |
cp build/app/outputs/flutter-apk/app-arm64-v8a-nightly-release.apk linwood-setonix-android-arm64.apk | |
cp build/app/outputs/flutter-apk/app-x86_64-nightly-release.apk linwood-setonix-android-x86_64.apk | |
- name: 🏭 Build architecture production | |
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }} | |
run: | | |
flutter build apk -v --release --target-platform android-arm,android-arm64,android-x64 --split-per-abi --flavor production | |
cp build/app/outputs/flutter-apk/app-armeabi-v7a-production-release.apk linwood-setonix-android-arm.apk | |
cp build/app/outputs/flutter-apk/app-arm64-v8a-production-release.apk linwood-setonix-android-arm64.apk | |
cp build/app/outputs/flutter-apk/app-x86_64-production-release.apk linwood-setonix-android-x86_64.apk | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: apk-arm-build | |
path: app/linwood-setonix-android-arm.apk | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: apk-arm64-build | |
path: app/linwood-setonix-android-arm64.apk | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: apk-x86_64-build | |
path: app/linwood-setonix-android-x86_64.apk | |
build-windows: | |
runs-on: windows-2022 | |
defaults: | |
run: | |
working-directory: app | |
steps: | |
- name: ⬆️ Checkout | |
uses: actions/checkout@v4 | |
- name: Make yq tool available on Windows runners | |
run: choco install yq | |
- uses: subosito/flutter-action@v2.16.0 | |
with: | |
flutter-version-file: app/pubspec.yaml | |
- name: ✅ Enable platforms | |
run: flutter config --enable-windows-desktop | |
- name: 📦 Get dependencies | |
run: | | |
flutter clean | |
flutter pub get | |
flutter doctor -v | |
- name: Build nessesary files | |
working-directory: ./ | |
run: | | |
cd tools | |
dart pub get | |
cd .. | |
dart run tools/generate.dart | |
- name: 🏭 Build nightly | |
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }} | |
run: | | |
flutter doctor -v | |
flutter build windows -v --release --dart-define=flavor=nightly | |
- name: 🏭 Build production | |
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }} | |
run: | | |
flutter doctor -v | |
flutter build windows -v --release --dart-define=flavor=production | |
- name: Build setup | |
shell: pwsh | |
run: | | |
Get-Content pubspec.yaml | Select-String -Pattern 'version:\s(.+)\+' | % {Set-Item -Path Env:SETONIX_VERSION -Value "$($_.matches.groups[1])"} | |
& 'C:/Program Files (x86)/Inno Setup 6/ISCC.exe' /DMyAppVersion=$Env:SETONIX_VERSION SetonixSetup.iss | |
# flutter pub run msix:create | |
- name: Copy portable start script | |
run: | | |
cp scripts/start.bat build/windows/x64/runner/Release/ | |
cp build/windows/x64/linwood-setonix-windows-setup.exe linwood-setonix-windows-setup-x86_64.exe | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-build | |
path: | | |
app/build/windows/x64/runner/Release/** | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows-setup | |
path: | | |
app/linwood-setonix-windows-setup-x86_64.exe | |
build-linux: | |
runs-on: ubuntu-24.04 | |
defaults: | |
run: | |
working-directory: app | |
steps: | |
- name: ⬆️ Checkout | |
uses: actions/checkout@v4 | |
- name: Get dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3-pip \ | |
python3-setuptools \ | |
desktop-file-utils \ | |
libgdk-pixbuf2.0-dev \ | |
fakeroot \ | |
strace \ | |
fuse \ | |
libgtk-3-dev \ | |
libx11-dev \ | |
pkg-config \ | |
cmake \ | |
ninja-build \ | |
libblkid-dev \ | |
liblzma-dev \ | |
clang \ | |
dpkg-dev \ | |
patchelf \ | |
alien \ | |
libsecret-1-dev \ | |
libjsoncpp-dev \ | |
rpm | |
- uses: subosito/flutter-action@v2.16.0 | |
with: | |
flutter-version-file: app/pubspec.yaml | |
- name: ✅ Enable platforms | |
run: flutter config --enable-linux-desktop | |
- name: 📦 Get dependencies | |
run: | | |
flutter clean | |
flutter pub get | |
flutter doctor -v | |
- name: Build nessesary files | |
working-directory: ./ | |
run: | | |
cd tools | |
dart pub get | |
cd .. | |
dart run tools/generate.dart | |
- name: 🏭 Build nightly | |
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }} | |
run: | | |
flutter doctor -v | |
flutter build linux -v --release --dart-define=flavor=nightly | |
- name: 🏭 Build production | |
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }} | |
run: | | |
flutter doctor -v | |
flutter build linux -v --release --dart-define=flavor=production | |
- name: 🏭 Make binary executable | |
run: | | |
chmod +x build/linux/x64/release/bundle/setonix | |
- name: Build .deb executable | |
run: | | |
cp -fr build/linux/x64/release/bundle linux/debian/usr/bin | |
dpkg-deb --build --root-owner-group linux/debian | |
cp linux/*.deb linwood-setonix-linux-x86_64.deb | |
- name: Build .rpm executable | |
run: | | |
bash scripts/build-rpm.sh | |
- name: Build .AppImage executable | |
run: | | |
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage | |
chmod +x appimage-builder-x86_64.AppImage | |
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder | |
appimage-builder --recipe AppImageBuilder.yml --skip-test | |
- name: Copy nessessary files | |
run: | | |
cp assets/images/logo.svg build/linux/x64/release/bundle/dev.linwood.setonix.svg | |
mkdir -p build/linux/x64/release/bundle/usr/share | |
cp -r linux/debian/usr/share build/linux/x64/release/bundle/usr | |
- name: Rename AppImage | |
run: | | |
ls | |
mv ./*.AppImage linwood-setonix-linux-x86_64.AppImage | |
- name: Copy portable start script | |
run: | | |
chmod +x scripts/start.sh | |
cp scripts/start.sh build/linux/x64/release/bundle | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-build | |
path: | | |
app/build/linux/x64/release/bundle/** | |
- name: Archive .deb | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-deb | |
path: | | |
app/linwood-setonix-linux-x86_64.deb | |
- name: Archive .rpm | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-rpm | |
path: | | |
app/build/linwood-setonix-linux-x86_64.rpm | |
- name: Archive .AppImage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-appimage | |
path: | | |
app/linwood-setonix-linux-x86_64.AppImage | |
build-flatpak: | |
name: build-flatpak | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
working-directory: app | |
steps: | |
- name: ⬆️ Checkout | |
uses: actions/checkout@v4 | |
- name: Get dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3-pip \ | |
python3-setuptools \ | |
desktop-file-utils \ | |
libgdk-pixbuf2.0-dev \ | |
fakeroot \ | |
strace \ | |
fuse \ | |
libgtk-3-dev \ | |
libx11-dev \ | |
pkg-config \ | |
cmake \ | |
ninja-build \ | |
libblkid-dev \ | |
liblzma-dev \ | |
clang \ | |
dpkg-dev \ | |
patchelf \ | |
alien \ | |
libsecret-1-dev \ | |
libjsoncpp-dev | |
- uses: subosito/flutter-action@v2.16.0 | |
with: | |
flutter-version-file: app/pubspec.yaml | |
- name: ✅ Enable platforms | |
run: flutter config --enable-linux-desktop | |
- name: 📦 Get dependencies | |
run: | | |
flutter clean | |
flutter pub get | |
flutter doctor -v | |
- name: Build nessesary files | |
working-directory: ./ | |
run: | | |
cd tools | |
dart pub get | |
cd .. | |
dart run tools/generate.dart | |
- name: 🏭 Build nightly | |
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }} | |
run: | | |
flutter doctor -v | |
flutter build linux -v --release --dart-define=flavor=nightly | |
- name: 🏭 Build production | |
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }} | |
run: | | |
flutter doctor -v | |
flutter build linux -v --release --dart-define=flavor=production | |
- name: Copy nessessary files | |
run: | | |
cp assets/images/logo.svg build/linux/x64/release/bundle/dev.linwood.setonix.svg | |
mkdir -p build/linux/x64/release/bundle/usr/share | |
cp -r linux/debian/usr/share build/linux/x64/release/bundle/usr | |
- name: Compress Flutter build | |
run: tar -C build/linux/x64/release/bundle -czf linwood-setonix-linux-portable-x86_64.tar.gz . | |
# - name: Install flatpak | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install -y flatpak | |
# - name: Install dependencies | |
# run: | | |
# flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo --user | |
# flatpak install flathub org.flatpak.Builder --user -y --arch=x86_64 | |
# - name: Build .flatpak | |
# timeout-minutes: 15 | |
# run: | | |
# flatpak run org.flatpak.Builder -v --force-clean --sandbox --delete-build-dirs --user --install-deps-from=flathub --arch=x86_64 flatpak_app flatpak.json --bundle-sources | |
# flatpak build-export export flatpak_app -v | |
# flatpak build-bundle export linwood-setonix-linux.flatpak dev.linwood.setonix -v | |
# - name: Upload .flatpak artifact to workflow | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: linux-flatpak | |
# path: app/linwood-setonix-linux.flatpak | |
- name: Archive old portable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-alternative-portable | |
path: app/build/linux/x64/release/bundle | |
build-macos: | |
runs-on: macos-latest | |
defaults: | |
run: | |
working-directory: app | |
steps: | |
- name: ⬆️ Checkout | |
uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2.16.0 | |
with: | |
flutter-version-file: app/pubspec.yaml | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: ✅ Enable platforms | |
run: flutter config --enable-macos-desktop | |
- name: 📦 Get dependencies | |
run: | | |
flutter clean | |
flutter pub get | |
flutter doctor -v | |
- name: Build nessesary files | |
working-directory: ./ | |
run: | | |
cd tools | |
dart pub get | |
cd .. | |
dart run tools/generate.dart | |
- name: 🏭 Build | |
run: | | |
flutter build macos -v --release | |
- name: Zip file | |
working-directory: app/build/macos/Build/Products/Release | |
run: zip --symlinks -qr linwood-setonix-macos.zip setonix.app | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- name: Install appdmg | |
run: | | |
python3 -m pip install setuptools | |
npm install -g appdmg | |
- name: Create dmg | |
run: | | |
appdmg DmgSetup.json linwood-setonix-macos.dmg | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-build | |
path: | | |
app/build/macos/Build/Products/Release/linwood-setonix-macos.zip | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-dmg | |
path: | | |
app/linwood-setonix-macos.dmg | |
build-ipa: | |
name: build-ipa (iOS) | |
runs-on: macos-latest | |
defaults: | |
run: | |
working-directory: app | |
steps: | |
- name: ⬆️ Checkout | |
uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@v2.16.0 | |
with: | |
flutter-version-file: app/pubspec.yaml | |
- name: 📦 Get dependencies | |
run: | | |
flutter clean | |
flutter pub get | |
flutter doctor -v | |
- name: Build nessesary files | |
working-directory: ./ | |
run: | | |
cd tools | |
dart pub get | |
cd .. | |
dart run tools/generate.dart | |
- name: 🏭 Build | |
run: | | |
flutter build ios --release --no-codesign -v | |
- name: Packing IPA | |
run: | | |
cd build/ios/iphoneos/ | |
rm -rf Payload | |
mkdir Payload | |
cp -R Runner.app Payload/ | |
rm -f linwood-setonix-ios.ipa | |
zip -vr linwood-setonix-ios.ipa Payload/ | |
# ls -l linwood-setonix-ios.ipa | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ipa-build | |
path: app/build/ios/iphoneos/linwood-setonix-ios.ipa | |
compression-level: 0 #ipa is already compressed | |
# build-snap: | |
# name: Build Snap | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# architecture: | |
# - amd64 | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: docker/setup-qemu-action@v2 | |
# with: | |
# image: tonistiigi/binfmt@sha256:df15403e06a03c2f461c1f7938b171fda34a5849eb63a70e2a2109ed5a778bde | |
# - uses: diddlesnaps/snapcraft-multiarch-action@v1 | |
# id: build | |
# with: | |
# architecture: ${{ matrix.architecture }} | |
# - uses: actions/upload-artifact@v4 | |
# with: | |
# name: setonix-snap | |
# path: ${{ steps.build.outputs.snap }} | |
build-server: | |
defaults: | |
run: | |
working-directory: server | |
strategy: | |
matrix: | |
os: | |
- name: ubuntu-24.04 | |
label: linux | |
- name: windows-2022 | |
label: windows | |
- name: macos-latest | |
label: macos | |
runs-on: ${{ matrix.os.name }} | |
steps: | |
- name: ⬆️ Checkout | |
uses: actions/checkout@v4 | |
- name: Install yq | |
if: ${{ matrix.os.name == 'windows-2022' }} | |
run: choco install yq | |
- uses: subosito/flutter-action@v2.16.0 | |
with: | |
flutter-version-file: app/pubspec.yaml | |
- name: 📦 Get dependencies | |
run: | | |
flutter clean | |
flutter pub get | |
flutter doctor -v | |
- name: Compile | |
run: | | |
dart compile exe bin/setonix_server.dart | |
- name: Create directory | |
run: | | |
mkdir -p server-build | |
mv bin/setonix_server.exe server-build/ | |
mkdir -p server-build/packs | |
- name: Build nessesary files | |
working-directory: ./ | |
run: | | |
cd tools | |
dart pub get | |
cd .. | |
dart run tools/generate.dart | |
cp app/assets/pack.stnx server/server-build/packs/.stnx | |
- name: Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: server-build-${{ matrix.os.label }} | |
path: server/server-build | |
deploy: | |
runs-on: ubuntu-24.04 | |
if: github.event_name != 'pull_request' | |
outputs: | |
version: ${{ steps.setup.outputs.SETONIX_VERSION }} | |
build_number: ${{ steps.setup.outputs.SETONIX_BUILD_NUMBER }} | |
needs: | |
- build-apk | |
- build-windows | |
- build-linux | |
- build-flatpak | |
- build-macos | |
- build-ipa | |
- build-server | |
steps: | |
- name: ⬆️ Checkout | |
uses: actions/checkout@v4 | |
env: | |
CI_PAT: ${{ secrets.CI_PAT }} | |
with: | |
token: ${{ env.CI_PAT }} | |
- name: Setup git | |
id: setup | |
run: | | |
SETONIX_VERSION_REGEX="version:\s(.+)\+(.+)" | |
[[ $(grep -E "${SETONIX_VERSION_REGEX}" app/pubspec.yaml) =~ ${SETONIX_VERSION_REGEX} ]] | |
SETONIX_VERSION="${BASH_REMATCH[1]}" | |
echo "SETONIX_VERSION=${SETONIX_VERSION}" >> $GITHUB_ENV | |
echo "SETONIX_VERSION=${SETONIX_VERSION}" >> $GITHUB_OUTPUT | |
SETONIX_BUILD_NUMBER="${BASH_REMATCH[2]}" | |
echo "SETONIX_BUILD_NUMBER=${SETONIX_BUILD_NUMBER}" >> $GITHUB_ENV | |
echo "SETONIX_BUILD_NUMBER=${SETONIX_BUILD_NUMBER}" >> $GITHUB_OUTPUT | |
git config --global user.email "ci@linwood.dev" | |
git config --global user.name "Linwood CI" | |
- uses: actions/download-artifact@v4 | |
with: | |
name: apk-build | |
- uses: actions/download-artifact@v4 | |
with: | |
name: apk-arm-build | |
- uses: actions/download-artifact@v4 | |
with: | |
name: apk-arm64-build | |
- uses: actions/download-artifact@v4 | |
with: | |
name: apk-x86_64-build | |
- uses: actions/download-artifact@v4 | |
with: | |
name: windows-build | |
path: windows-build/ | |
- uses: actions/download-artifact@v4 | |
with: | |
name: linux-build | |
path: linux-build/ | |
- uses: actions/download-artifact@v4 | |
with: | |
name: linux-deb | |
- uses: actions/download-artifact@v4 | |
with: | |
name: linux-rpm | |
- uses: actions/download-artifact@v4 | |
with: | |
name: linux-appimage | |
- uses: actions/download-artifact@v4 | |
with: | |
name: linux-alternative-portable | |
path: linux-alternative-portable/ | |
- uses: actions/download-artifact@v4 | |
with: | |
name: windows-setup | |
- uses: actions/download-artifact@v4 | |
with: | |
name: macos-build | |
- uses: actions/download-artifact@v4 | |
with: | |
name: macos-dmg | |
- uses: actions/download-artifact@v4 | |
with: | |
name: ipa-build | |
- uses: actions/download-artifact@v4 | |
with: | |
name: server-build-linux | |
path: server-build-linux/ | |
- uses: actions/download-artifact@v4 | |
with: | |
name: server-build-windows | |
path: server-build-windows/ | |
- uses: actions/download-artifact@v4 | |
with: | |
name: server-build-macos | |
path: server-build-macos/ | |
- name: 📦 Zip artifacts | |
run: | | |
zip -r linwood-setonix-windows-x86_64.zip windows-build/* | |
tar -C linux-build -czf linwood-setonix-linux-x86_64.tar.gz . | |
tar -C linux-alternative-portable -czf linwood-setonix-linux-alternative-x86_64.tar.gz . | |
zip -r linwood-setonix-server-windows-x86_64.zip server-build-windows/* | |
tar -C server-build-linux -czf linwood-setonix-server-linux-x86_64.tar.gz . | |
zip -r linwood-setonix-server-macos.zip server-build-macos/* | |
- name: Configure git | |
if: ${{ github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' }} | |
run: | | |
git --version | |
git config --global user.email "actions@github.com" | |
git config --global user.name "Actions" | |
git pull --tags | |
- name: 🚀 Deploy stable | |
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }} | |
uses: softprops/action-gh-release@v2 | |
continue-on-error: true | |
with: | |
prerelease: true | |
tag_name: stable | |
files: | | |
linwood-setonix-windows-setup-x86_64.exe | |
linwood-setonix-windows-x86_64.zip | |
linwood-setonix-linux-x86_64.tar.gz | |
linwood-setonix-linux-alternative-x86_64.tar.gz | |
linwood-setonix-linux-x86_64.deb | |
linwood-setonix-linux-x86_64.rpm | |
linwood-setonix-linux-x86_64.AppImage | |
linwood-setonix-macos.zip | |
linwood-setonix-macos.dmg | |
linwood-setonix-android.apk | |
linwood-setonix-ios.ipa | |
linwood-setonix-server-linux-x86_64.tar.gz | |
linwood-setonix-server-windows-x86_64.zip | |
linwood-setonix-server-macos.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: 🚀 Deploy nightly | |
if: ${{ github.ref == 'refs/tags/nightly' }} | |
uses: softprops/action-gh-release@v2 | |
continue-on-error: true | |
with: | |
prerelease: true | |
tag_name: nightly | |
files: | | |
linwood-setonix-windows-setup-x86_64.exe | |
linwood-setonix-windows-x86_64.zip | |
linwood-setonix-linux-x86_64.tar.gz | |
linwood-setonix-linux-alternative-x86_64.tar.gz | |
linwood-setonix-linux-x86_64.deb | |
linwood-setonix-linux-x86_64.rpm | |
linwood-setonix-linux-x86_64.AppImage | |
linwood-setonix-macos.zip | |
linwood-setonix-macos.dmg | |
linwood-setonix-android.apk | |
linwood-setonix-android-arm.apk | |
linwood-setonix-android-arm64.apk | |
linwood-setonix-android-x86_64.apk | |
linwood-setonix-ios.ipa | |
linwood-setonix-server-linux-x86_64.tar.gz | |
linwood-setonix-server-windows-x86_64.zip | |
linwood-setonix-server-macos.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
continue-on-error: true | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
files: | | |
linwood-setonix-windows-setup-x86_64.exe | |
linwood-setonix-windows-x86_64.zip | |
linwood-setonix-linux-x86_64.tar.gz | |
linwood-setonix-linux-alternative-x86_64.tar.gz | |
linwood-setonix-linux-x86_64.deb | |
linwood-setonix-linux-x86_64.rpm | |
linwood-setonix-linux-x86_64.AppImage | |
linwood-setonix-macos.zip | |
linwood-setonix-macos.dmg | |
linwood-setonix-android.apk | |
linwood-setonix-android-arm.apk | |
linwood-setonix-android-arm64.apk | |
linwood-setonix-android-x86_64.apk | |
linwood-setonix-ios.ipa | |
linwood-setonix-server-linux-x86_64.tar.gz | |
linwood-setonix-server-windows-x86_64.zip | |
linwood-setonix-server-macos.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
deploy-to-play-store: | |
runs-on: ubuntu-24.04 | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
defaults: | |
run: | |
working-directory: app | |
env: | |
PLAY_STORE_CREDENTIALS: ${{ secrets.PLAY_STORE_CREDENTIALS }} | |
steps: | |
- name: ⬆️ Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.CI_PAT }} | |
- name: Setup git | |
run: | | |
git config --global user.email "ci@linwood.dev" | |
git config --global user.name "Linwood CI" | |
- name: Import files | |
env: | |
KEY_JKS: ${{ secrets.KEY_JKS }} | |
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }} | |
PLAY_STORE_CREDENTIALS: ${{ secrets.PLAY_STORE_CREDENTIALS }} | |
if: ${{ env.PLAY_STORE_CREDENTIALS != '' }} | |
run: | | |
cd android | |
if [[ -n "$KEY_PROPERTIES" ]] ; then echo "$KEY_PROPERTIES" | base64 --decode > key.properties ; fi | |
if [[ -n "$KEY_JKS" ]] ; then echo "$KEY_JKS" | base64 --decode > key.jks ; fi | |
echo "$PLAY_STORE_CREDENTIALS" | base64 --decode > play-store-credentials.json | |
- name: 🔧 Setup java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
- uses: subosito/flutter-action@v2.16.0 | |
with: | |
flutter-version-file: app/pubspec.yaml | |
- name: 📦 Get dependencies | |
run: | | |
flutter pub get | |
- name: Setup Fastlane | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.3.5" | |
bundler-cache: true | |
working-directory: app/android | |
- name: 🚀 Deploy to Play Store | |
if: ${{ github.ref == 'refs/tags/stable' && env.PLAY_STORE_CREDENTIALS != '' }} | |
env: | |
PLAY_STORE_CREDENTIALS: ${{ secrets.PLAY_STORE_CREDENTIALS }} | |
run: bundle exec fastlane deploy | |
working-directory: app/android | |
- name: 🚀 Deploy to Play Store | |
if: ${{ github.ref == 'refs/tags/nightly' && env.PLAY_STORE_CREDENTIALS != '' }} | |
env: | |
PLAY_STORE_CREDENTIALS: ${{ secrets.PLAY_STORE_CREDENTIALS }} | |
run: bundle exec fastlane beta | |
working-directory: app/android | |
#publish-winget: | |
# needs: [deploy] | |
# runs-on: windows-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# token: ${{ secrets.CI_PAT }} | |
# - if: ${{ github.ref == 'refs/tags/stable' }} | |
# uses: vedantmgoyal2009/winget-releaser@v2 | |
# with: | |
# identifier: LinwoodCloud.Setonix | |
# version: ${{ needs.deploy.outputs.version }} | |
# release-tag: v${{ needs.deploy.outputs.version }} | |
# token: ${{ secrets.CI_PAT }} | |
# - if: ${{ github.ref == 'refs/tags/nightly' }} | |
# uses: vedantmgoyal2009/winget-releaser@v2 | |
# with: | |
# identifier: LinwoodCloud.Setonix.Nightly | |
# version: ${{ needs.deploy.outputs.version }} | |
# release-tag: v${{ needs.deploy.outputs.version }} | |
# token: ${{ secrets.CI_PAT }} |