Skip to content

Merge pull request #36 from guchengxi1994/master #2

Merge pull request #36 from guchengxi1994/master

Merge pull request #36 from guchengxi1994/master #2

name: Build Linux arm64 App
on:
push:
branches:
- release
jobs:
build:
runs-on: [ self-hosted, linux, arm64 ]
steps:
- uses: actions/checkout@v4
with:
lfs: true
- 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 }}