Skip to content

Fix event system in lua #550

Fix event system in lua

Fix event system in lua #550

Workflow file for this run

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@v5
- name: 🔧 Setup java
uses: actions/setup-java@v5
with:
java-version: "17"
distribution: "temurin"
- uses: subosito/[email protected]
with:
flutter-version-file: app/pubspec.yaml
cache: true
- 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 nightly (legacy packaging)
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }}
run: |
USE_LEGACY_PACKAGING=true flutter build apk -v --release --flavor nightly --dart-define=flavor=nightly
cp build/app/outputs/flutter-apk/app-nightly-release.apk linwood-setonix-android-legacy.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: 🏭 Build production (legacy packaging)
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
run: |
USE_LEGACY_PACKAGING=true flutter build apk -v --release --flavor production
cp build/app/outputs/flutter-apk/app-production-release.apk linwood-setonix-android-legacy.apk
- name: Archive
uses: actions/upload-artifact@v4
with:
name: apk-build
path: app/linwood-setonix-android.apk
- name: Archive (legacy)
uses: actions/upload-artifact@v4
with:
name: apk-build-legacy
path: app/linwood-setonix-android-legacy.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 nightly (legacy packaging)
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }}
run: |
USE_LEGACY_PACKAGING=true 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-legacy.apk
cp build/app/outputs/flutter-apk/app-arm64-v8a-nightly-release.apk linwood-setonix-android-arm64-legacy.apk
cp build/app/outputs/flutter-apk/app-x86_64-nightly-release.apk linwood-setonix-android-x86_64-legacy.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: 🏭 Build architecture production (legacy packaging)
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
run: |
USE_LEGACY_PACKAGING=true 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-legacy.apk
cp build/app/outputs/flutter-apk/app-arm64-v8a-production-release.apk linwood-setonix-android-arm64-legacy.apk
cp build/app/outputs/flutter-apk/app-x86_64-production-release.apk linwood-setonix-android-x86_64-legacy.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
- name: Copy Corepack
working-directory: ./
run: |
cp app/assets/pack.stnx core.stnx
- name: Archive Corepack
uses: actions/upload-artifact@v4
with:
name: corepack
path: core.stnx
- name: Archive (legacy arm)
uses: actions/upload-artifact@v4
with:
name: apk-arm-build-legacy
path: app/linwood-setonix-android-arm-legacy.apk
- name: Archive (legacy arm64)
uses: actions/upload-artifact@v4
with:
name: apk-arm64-build-legacy
path: app/linwood-setonix-android-arm64-legacy.apk
- name: Archive (legacy x86_64)
uses: actions/upload-artifact@v4
with:
name: apk-x86_64-build-legacy
path: app/linwood-setonix-android-x86_64-legacy.apk
build-windows:
runs-on: windows-2025
defaults:
run:
working-directory: app
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v5
- name: Make yq tool available on Windows runners
run: |
choco install yq
choco install innosetup
- uses: subosito/[email protected]
with:
flutter-version-file: app/pubspec.yaml
cache: true
- 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-msix:
name: build-msix
runs-on: windows-2025
defaults:
run:
working-directory: app
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v5
- uses: subosito/[email protected]
with:
flutter-version-file: app/pubspec.yaml
cache: true
- 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 MSIX
run: |
dart run msix:create
- name: Archive
uses: actions/upload-artifact@v4
with:
name: msix-build
path: app/build/windows/x64/runner/Release/setonix.msix
build-linux:
strategy:
fail-fast: false
matrix:
arch:
- image: ubuntu-24.04
name: x86_64
dir: x64
appimage: x86_64
- image: ubuntu-24.04-arm
name: arm64
dir: arm64
appimage: aarch64
- image: ubuntu-22.04
name: alternative-x86_64
dir: x64
appimage: x86_64
- image: ubuntu-22.04-arm
name: alternative-arm64
dir: arm64
appimage: aarch64
runs-on: ${{ matrix.arch.image }}
defaults:
run:
working-directory: app
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v5
- 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/[email protected]
with:
flutter-version-file: app/pubspec.yaml
channel: "master"
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
- name: ✅ Enable platforms
run: |
rm -f "$(dirname "$(dirname "$(command -v flutter)")")/engine/src/.gn"
flutter config --enable-linux-desktop
- name: 📦 Get dependencies
run: |
flutter clean
flutter doctor -v
flutter pub get
- 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/${{ matrix.arch.dir }}/release/bundle/setonix
- name: Update files to arm64
if: ${{ matrix.arch.dir == 'arm64' }}
run: |
sed -i 's/^Architecture: amd64/Architecture: arm64/' linux/debian/DEBIAN/control
- name: Build .deb executable
run: |
cp -fr build/linux/${{ matrix.arch.dir }}/release/bundle linux/debian/usr/bin
dpkg-deb --build --root-owner-group linux/debian
cp linux/*.deb linwood-setonix-linux-${{ matrix.arch.name }}.deb
- name: Build .rpm executable
run: |
bash scripts/build-rpm.sh -d ${{ matrix.arch.dir }} -b ${{ matrix.arch.name }}
- name: Build .AppImage executable
run: |
wget -O appimagetool.AppImage https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${{ matrix.arch.appimage }}.AppImage
chmod +x appimagetool.AppImage
# Build AppDir
mkdir -p AppDir/usr/bin
# move bundle folder to AppDir
cp build/linux/${{ matrix.arch.dir }}/release/bundle/* AppDir/usr/bin/ -r
mkdir -p AppDir/usr/share/icons/hicolor
cp linux/debian/usr/share/icons/hicolor AppDir/usr/share/icons/ -r
mkdir -p AppDir/usr/share/metainfo/
cp linux/debian/usr/share/metainfo/dev.linwood.setonix.appdata.xml AppDir/usr/share/metainfo/
mkdir -p AppDir/usr/share/applications/
cp linux/debian/usr/share/applications/dev.linwood.setonix.desktop AppDir/usr/share/applications/
ln -s usr/share/applications/dev.linwood.setonix.desktop AppDir/dev.linwood.setonix.desktop
ln -s usr/bin/setonix AppDir/AppRun
ln -s usr/share/icons/hicolor/256x256/apps/dev.linwood.setonix.png AppDir/dev.linwood.setonix.png
# Build AppImage
./appimagetool.AppImage AppDir linwood-setonix-linux-${{ matrix.arch.name }}.AppImage
- name: Copy nessessary files
run: |
cp assets/images/logo.svg build/linux/${{ matrix.arch.dir }}/release/bundle/dev.linwood.setonix.svg
mkdir -p build/linux/${{ matrix.arch.dir }}/release/bundle/usr/share
cp -r linux/debian/usr/share build/linux/${{ matrix.arch.dir }}/release/bundle/usr
- name: Copy portable start script
run: |
chmod +x scripts/start.sh
cp scripts/start.sh build/linux/${{ matrix.arch.dir }}/release/bundle
- name: Archive
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.arch.name }}-build
path: |
app/build/linux/${{ matrix.arch.dir }}/release/bundle/**
- name: Archive .deb
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.arch.name }}-deb
path: |
app/linwood-setonix-linux-${{ matrix.arch.name }}.deb
- name: Archive .rpm
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.arch.name }}-rpm
path: |
app/build/linwood-setonix-linux-${{ matrix.arch.name }}.rpm
- name: Archive .AppImage
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.arch.name }}-appimage
path: |
app/linwood-setonix-linux-${{ matrix.arch.name }}.AppImage
build-snap:
name: build-snap
strategy:
fail-fast: false
matrix:
arch:
- image: ubuntu-24.04
name: x86_64
dir: x64
appimage: x86_64
- image: ubuntu-24.04-arm
name: arm64
dir: arm64
appimage: aarch64
runs-on: ${{ matrix.arch.image }}
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v5
- name: Add snapcraft directory
run: |
mkdir -p snap
cp app/snapcraft.yaml snap/snapcraft.yaml
- uses: snapcore/action-build@v1
id: build
- uses: snapcore/action-publish@v1
name: Publish Snap to Store
if: ${{ github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' || github.ref == 'refs/tags/nightly' || github.ref == 'refs/tags/stable' }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_CREDENTIALS }}
with:
snap: ${{ steps.build.outputs.snap }}
release: ${{ github.ref == 'refs/heads/develop' && 'edge' || github.ref == 'refs/heads/main' && 'candidate' || github.ref == 'refs/tags/nightly' && 'beta' || 'stable' }}
- uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.arch.name }}-snap
path: ${{ steps.build.outputs.snap }}
build-macos:
runs-on: macos-14
defaults:
run:
working-directory: app
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v5
- uses: subosito/[email protected]
with:
flutter-version-file: app/pubspec.yaml
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- 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@v5
with:
node-version: 24
- 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-14
defaults:
run:
working-directory: app
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v5
- uses: subosito/[email protected]
with:
flutter-version-file: app/pubspec.yaml
cache: true
- 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-server:
defaults:
run:
working-directory: server
strategy:
matrix:
os:
- name: ubuntu-24.04
label: linux-x86_64
rust: libsetonix_plugin.so
- name: ubuntu-24.04-arm
label: linux-arm64
rust: libsetonix_plugin.so
- name: windows-2025
label: windows-x86_64
rust: setonix_plugin.dll
- name: macos-latest
label: macos
rust: libsetonix_plugin.dylib
runs-on: ${{ matrix.os.name }}
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v4
- name: Install yq
if: ${{ matrix.os.name == 'windows-2025' }}
run: choco install yq
- name: Install tree
if: ${{ matrix.os.name == 'macos-latest' }}
run: brew install tree
- uses: subosito/[email protected]
with:
flutter-version-file: app/pubspec.yaml
channel: "master"
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:"
- name: 📦 Get dependencies
run: |
flutter clean
flutter pub get
flutter doctor -v
- name: Compile rust
working-directory: plugin/rust
run: |
cargo build --release
- 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: Move rust lib
working-directory: ./
run: |
cp plugin/rust/target/release/${{ matrix.os.rust }} server/server-build/
- name: Build nessesary files
working-directory: ./
run: |
cd tools
dart pub get
cd ..
dart run tools/generate.dart
tree -a -L 2 server/server-build
- name: Archive
uses: actions/upload-artifact@v4
with:
name: server-build-${{ matrix.os.label }}
path: server/server-build
# build-docker:
# runs-on: ubuntu-24.04
# if: github.event_name != 'pull_request'
# steps:
# - name: ⬆️ Checkout
# uses: actions/checkout@v5
# - name: Set Docker tag
# id: docker_tag
# run: |
# if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
# echo "tag=latest" >> $GITHUB_ENV
# elif [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then
# echo "tag=dev" >> $GITHUB_ENV
# elif [[ "${GITHUB_REF}" == refs/tags/v* || "${GITHUB_REF}" == "refs/tags/stable" || "${GITHUB_REF}" == "refs/tags/nightly" ]]; then
# echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
# else
# echo "tag=unknown" >> $GITHUB_ENV
# fi
# - name: Log Docker tag
# run: echo "Docker tag is ${{ env.tag }}"
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v3
# - name: Build and push Docker image
# uses: docker/build-push-action@v6
# if: ${{ env.tag != 'unknown' }}
# with:
# context: .
# file: ./Dockerfile
# push: true
# tags: linwooddev/setonix:${{ env.tag }}
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-macos
- build-ipa
- build-server
steps:
- name: ⬆️ Checkout
uses: actions/checkout@v5
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 "[email protected]"
git config --global user.name "Linwood CI"
- uses: actions/download-artifact@v5
with:
name: apk-build
- uses: actions/download-artifact@v5
with:
name: apk-arm-build
- uses: actions/download-artifact@v5
with:
name: apk-arm64-build
- uses: actions/download-artifact@v5
with:
name: apk-x86_64-build
- uses: actions/download-artifact@v5
with:
name: apk-build-legacy
- uses: actions/download-artifact@v5
with:
name: apk-arm-build-legacy
- uses: actions/download-artifact@v5
with:
name: apk-arm64-build-legacy
- uses: actions/download-artifact@v5
with:
name: apk-x86_64-build-legacy
- uses: actions/download-artifact@v5
with:
name: windows-build
path: windows-build/
- uses: actions/download-artifact@v5
with:
name: linux-x86_64-build
path: linux-x86_64-build/
- uses: actions/download-artifact@v5
with:
name: linux-x86_64-deb
- uses: actions/download-artifact@v5
with:
name: linux-x86_64-rpm
- uses: actions/download-artifact@v5
with:
name: linux-x86_64-appimage
- uses: actions/download-artifact@v5
with:
name: linux-arm64-build
path: linux-arm64-build/
- uses: actions/download-artifact@v5
with:
name: linux-arm64-deb
- uses: actions/download-artifact@v5
with:
name: linux-arm64-rpm
- uses: actions/download-artifact@v5
with:
name: linux-arm64-appimage
- uses: actions/download-artifact@v5
with:
name: linux-alternative-x86_64-build
path: linux-alternative-x86_64-build/
- uses: actions/download-artifact@v5
with:
name: linux-alternative-x86_64-deb
- uses: actions/download-artifact@v5
with:
name: linux-alternative-x86_64-rpm
- uses: actions/download-artifact@v5
with:
name: linux-alternative-x86_64-appimage
- uses: actions/download-artifact@v5
with:
name: linux-alternative-arm64-build
path: linux-alternative-arm64-build/
- uses: actions/download-artifact@v5
with:
name: linux-alternative-arm64-deb
- uses: actions/download-artifact@v5
with:
name: linux-alternative-arm64-rpm
- uses: actions/download-artifact@v5
with:
name: linux-alternative-arm64-appimage
- uses: actions/download-artifact@v5
with:
name: windows-setup
- uses: actions/download-artifact@v5
with:
name: macos-build
- uses: actions/download-artifact@v5
with:
name: macos-dmg
- uses: actions/download-artifact@v5
with:
name: ipa-build
- name: 📦 Zip artifacts
run: |
cd windows-build
zip -r ../linwood-setonix-windows-x86_64.zip *
cd ..
tar -C linux-x86_64-build -czf linwood-setonix-linux-x86_64.tar.gz .
tar -C linux-arm64-build -czf linwood-setonix-linux-arm64.tar.gz .
tar -C linux-alternative-x86_64-build -czf linwood-setonix-linux-alternative-x86_64.tar.gz .
tar -C linux-alternative-arm64-build -czf linwood-setonix-linux-alternative-arm64.tar.gz .
- name: Configure git
if: ${{ github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' }}
run: |
git --version
git config --global user.email "[email protected]"
git config --global user.name "Actions"
git pull --tags
- name: Add checksums
run: |
output_file="checksums.txt"
# Empty the output file if it exists
> "$output_file"
# Find and loop through all files starting with "linwood-setonix" in the current directory
for file in linwood-setonix*; do
# Check if the file exists (in case no matches were found)
if [ -f "$file" ]; then
# Append sha256sum to the output file in the format "hash filename"
sha256sum "$file" >> "$output_file"
fi
done
echo "SHA256 hashes for files starting with 'linwood-setonix' saved to $output_file"
- 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-x86_64.deb
linwood-setonix-linux-x86_64.rpm
linwood-setonix-linux-x86_64.AppImage
linwood-setonix-linux-arm64.tar.gz
linwood-setonix-linux-arm64.deb
linwood-setonix-linux-arm64.rpm
linwood-setonix-linux-arm64.AppImage
linwood-setonix-linux-alternative-x86_64.tar.gz
linwood-setonix-linux-alternative-x86_64.deb
linwood-setonix-linux-alternative-x86_64.rpm
linwood-setonix-linux-alternative-x86_64.AppImage
linwood-setonix-linux-alternative-arm64.tar.gz
linwood-setonix-linux-alternative-arm64.deb
linwood-setonix-linux-alternative-arm64.rpm
linwood-setonix-linux-alternative-arm64.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-android-legacy.apk
linwood-setonix-android-arm-legacy.apk
linwood-setonix-android-arm64-legacy.apk
linwood-setonix-android-x86_64-legacy.apk
linwood-setonix-ios.ipa
checksums.txt
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-x86_64.deb
linwood-setonix-linux-x86_64.rpm
linwood-setonix-linux-x86_64.AppImage
linwood-setonix-linux-arm64.tar.gz
linwood-setonix-linux-arm64.deb
linwood-setonix-linux-arm64.rpm
linwood-setonix-linux-arm64.AppImage
linwood-setonix-linux-alternative-x86_64.tar.gz
linwood-setonix-linux-alternative-x86_64.deb
linwood-setonix-linux-alternative-x86_64.rpm
linwood-setonix-linux-alternative-x86_64.AppImage
linwood-setonix-linux-alternative-arm64.tar.gz
linwood-setonix-linux-alternative-arm64.deb
linwood-setonix-linux-alternative-arm64.rpm
linwood-setonix-linux-alternative-arm64.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-android-legacy.apk
linwood-setonix-android-arm-legacy.apk
linwood-setonix-android-arm64-legacy.apk
linwood-setonix-android-x86_64-legacy.apk
linwood-setonix-ios.ipa
checksums.txt
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-x86_64.deb
linwood-setonix-linux-x86_64.rpm
linwood-setonix-linux-x86_64.AppImage
linwood-setonix-linux-arm64.tar.gz
linwood-setonix-linux-arm64.deb
linwood-setonix-linux-arm64.rpm
linwood-setonix-linux-arm64.AppImage
linwood-setonix-linux-alternative-x86_64.tar.gz
linwood-setonix-linux-alternative-x86_64.deb
linwood-setonix-linux-alternative-x86_64.rpm
linwood-setonix-linux-alternative-x86_64.AppImage
linwood-setonix-linux-alternative-arm64.tar.gz
linwood-setonix-linux-alternative-arm64.deb
linwood-setonix-linux-alternative-arm64.rpm
linwood-setonix-linux-alternative-arm64.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-android-legacy.apk
linwood-setonix-android-arm-legacy.apk
linwood-setonix-android-arm64-legacy.apk
linwood-setonix-android-x86_64-legacy.apk
linwood-setonix-ios.ipa
checksums.txt
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@v5
with:
token: ${{ secrets.CI_PAT }}
- name: Setup git
run: |
git config --global user.email "[email protected]"
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@v5
with:
java-version: "17"
distribution: "temurin"
- uses: subosito/[email protected]
with:
flutter-version-file: app/pubspec.yaml
cache: true
- name: Build nessesary files
working-directory: ./
run: |
cd tools
dart pub get
cd ..
dart run tools/generate.dart
- name: 📦 Get dependencies
run: |
flutter pub get
- name: Setup Fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.7"
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 }}