Skip to content

Use 256 chars

Use 256 chars #23

Workflow file for this run

name: Build linux
on:
push:
workflow_dispatch:
merge_group:
jobs:
windows-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@main
- name: Set up Flutter
uses: subosito/flutter-action@main
- name: Build
run: |
whoami /groups
mkdir Cert
New-SelfSignedCertificate -Type Custom -Subject "CN=Contoso Software, O=Contoso Corporation, C=US" -KeyUsage DigitalSignature -FriendlyName "TaYaKi71751" -CertStoreLocation "Cert:\CurrentUser\My" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")
$Thumbprint=Get-ChildItem -Path Cert:\CurrentUser\My\
$Thumbprint=$Thumbprint.Thumbprint
$length = 256
$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
$randomString = -join ((1..$length) | ForEach-Object { $characters | Get-Random })
$password = ConvertTo-SecureString -String $randomString -Force -AsPlainText
Export-PfxCertificate -cert "Cert:\CurrentUser\My\$Thumbprint" -FilePath .\Cert\test_certificate.pfx -Password $password
flutter build windows
flutter pub run msix:create --certificate-path test_certificate.pfx
- name: Save build Artifact
uses: actions/upload-artifact@main
with:
name: package (EXE Files)
path: |
build\windows\x64\runner\Release\*
Cert\test_certificate.pfx
# https://github.com/AppImageCrafters/appimage-builder-flutter-example/blob/main/.github/workflows/appimage.yml
linux-build:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
# - arch: armv7
# distro: ubuntu20.04
# - arch: aarch64
# distro: ubuntu20.04
- arch: x86_64
distro: ubuntu20.04
steps:
- uses: actions/checkout@main
- uses: subosito/flutter-action@main
if: ${{ matrix.arch == 'x86_64' }}
# with:
# flutter-version: '1.22.4'
# - run: flutter channel beta
# - run: flutter upgrade
- name: flutter config --enable-linux-desktop on host
run: flutter config --enable-linux-desktop
if: ${{ matrix.arch == 'x86_64' }}
- name: "Install dependencies"
if: ${{ matrix.arch == 'x86_64' }}
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build build-essential pkg-config curl file git unzip xz-utils zip libgtk-3-dev
- run: echo ${{ github.event.repository.name }}
- name: Build for linux/${{ matrix.arch }} using uraimo/run-on-arch-action
if: ${{ matrix.arch != 'x86_64' }}
uses: uraimo/run-on-arch-action@master
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
# https://github.com/uraimo/run-on-arch-action/issues/34
setup: |
mkdir -p "${PWD}/build"
dockerRunArgs: |
--volume "${PWD}/build:/home/${USER}/${{ github.event.repository.name }}/${{ github.event.repository.name }}/build"
run: |
apt-get update > /dev/null
apt-get install -y clang cmake ninja-build build-essential pkg-config curl wget file git unzip xz-utils zip libgtk-3-dev > /dev/null
bash << EOF
if [ "${{ matrix.arch }}" == "aarch64" ];then
git clone https://github.com/flutter/flutter.git
export PATH=$PATH:$(pwd)/flutter/bin
flutter doctor -v
flutter config --enable-linux-desktop
python preprocess-linux.py
flutter build linux
find ./build/linux/*/release/plugins -type f -name '*.so' -exec cp {} ./build/linux/*/release/bundle/lib/ \;
fi
EOF
- name: Build for linux/${{ matrix.arch }} on host
if: ${{ matrix.arch == 'x86_64' }}
run: |
git clone https://github.com/flutter/flutter.git
export PATH=$PATH:$(pwd)/flutter/bin
flutter doctor -v
echo flutter build linux
flutter build linux
find ./build -type f -name '*.so'
find ./build/linux/*/release/plugins -type f -name '*.so' -exec cp {} ./build/linux/*/release/bundle/lib/ \; || true
find ./build -type f -name '*.so'
- run: find ./build -type f -name '*.so'
- name: Build AppImage unsing appimage-builder
uses: docker://appimagecrafters/appimage-builder:0.8.5
with:
entrypoint: appimage-builder
args: --recipe ./AppImageBuilder-${{ matrix.arch }}.yml --skip-test
- name: Save build Artifact
uses: actions/upload-artifact@main
with:
name: AppImage
path: './*.AppImage*'