Skip to content

Merge pull request #39 from guchengxi1994/master #5

Merge pull request #39 from guchengxi1994/master

Merge pull request #39 from guchengxi1994/master #5

name: Build Linux arm64 App
on:
push:
branches:
- release
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
architecture: [arm64]
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
arch: armv7
distro: ubuntu22.04
# Not required, but speeds up builds by storing container images in
# a GitHub package registry.
# githubToken: ${{ github.token }}
# Set an output parameter `uname` for use in subsequent steps
run: |
uname -a
echo ::set-output name=uname::$(uname -a)
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.22.0
- name: Cache pubspec
id: cache-pubspec
uses: actions/cache@v3
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
pubspec-
- name: Install Rust Toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
rustup default stable
- name: install dependencies
run: |
sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub
sudo apt-get update
sudo apt-get install clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev -y
chmod +x /home/runner/work/all_in_one/all_in_one/rust_builder/cargokit/run_build_tool.sh
- name: Get dependencies
run: flutter pub get
- name: Bump build number
run: |
flutter pub global activate cider
- name: Build Linux app
run: flutter build linux --release -v
- name: Set tag name
run: echo "tag_name=v$(cider version)" >> $GITHUB_ENV
- name: List files in build directory
run: ls -la build/linux/x64/release/bundle/
# - name: Upload build artifacts
# uses: actions/upload-artifact@v2
# with:
# name: linux-app
# path: build/linux/x64/release/bundle/
- name: Archive release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'linux-arm64.zip'
directory: build/linux/x64/release/bundle/
- name: Publish release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: build/linux/x64/release/bundle/linux-arm64.zip
generateReleaseNotes: true
tag: ${{ env.tag_name }}
token: ${{ secrets.RELEASE_TOKEN }}