-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (43 loc) · 1.63 KB
/
build_linux.yml
File metadata and controls
45 lines (43 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Build executables (Linux)
on:
workflow_call:
inputs:
postfix:
required: true
type: string
jobs:
build_ubuntu:
runs-on: ubuntu-latest
# needs:
# - test_heavy_ubuntu
env:
MACHINE_OS: linux
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2.8.0
with:
channel: 'stable'
- name: Install Linux dependencies
# if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev liblzma-dev
- name: Doctor
run: flutter doctor -v
- name: Install Dependencies
run: |
flutter config --enable-linux-desktop
flutter packages get
- name: Build release
run: |
flutter build -v ${{ env.MACHINE_OS }} --release
- name: Copy essentials to Linux artifacs and package (Release)
run: |
cp -r ${{ github.workspace }}/build_dependencies/linux ${{ github.workspace }}/build/linux/x64/release/minecraft_cube_desktop
mv ${{ github.workspace }}/build/linux/x64/release/bundle/* ${{ github.workspace }}/build/linux/x64/release/minecraft_cube_desktop/usr/local/lib/minecraft_cube_desktop/
dpkg-deb --build --root-owner-group ${{ github.workspace }}/build/linux/x64/release/minecraft_cube_desktop
- name: Upload Linux artifaces (Release)
uses: actions/upload-artifact@v3
with:
name: linux-release-${{ inputs.postfix }}
path: ${{ github.workspace }}/build/linux/x64/release/minecraft_cube_desktop.deb