name: "Linux ARM Build" on: push: tags: ['v*'] jobs: build: runs-on: ubuntu-latest permissions: contents: write timeout-minutes: 25 steps: - name: "Code Checkout" uses: actions/checkout@v3 - name: "Java Setup" uses: actions/setup-java@v2 with: distribution: "zulu" java-version: "11" - name: Build Linux (arm64) uses: uraimo/run-on-arch-action@v2 with: arch: aarch64 distro: ubuntu_latest githubToken: ${{ github.token }} setup: | mkdir -p "${PWD}/AppDir" dockerRunArgs: | --volume "${PWD}/AppDir:/AppDir" install: | echo Installing dependencies apt-get update -qq -y apt-get install -qq -y \ sudo \ bash curl file git unzip xz-utils zip \ clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev \ libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-good echo Installing Flutter git clone https://github.com/flutter/flutter.git -b stable --depth 1 /opt/flutter /opt/flutter/bin/flutter doctor -v run: | echo Creating non-root user useradd -m nonroot chown -R nonroot /opt/flutter chown -R nonroot . echo Building sudo -u nonroot /opt/flutter/bin/flutter build linux --target-platform linux-arm64 mv build/linux/arm64/release/bundle/* /AppDir/ chown -R nonroot /AppDir/ chmod -R a+rw /AppDir/ chmod +x /AppDir/dateapp - name: Compress Flutter build id: compress run: | archiveName="dateapp-linux-arm64.tar.gz" echo "archiveName=$archiveName" >> $GITHUB_OUTPUT sudo chown -R $USER:$USER . tar -C AppDir -czf $archiveName . - name: Release to GitHub uses: ncipollo/release-action@v1 with: artifacts: "dateapp-linux-arm64.tar.gz" tag: ${{ steps.version.outputs.content }} commit: ${{ github.sha }} allowUpdates: true