Add ls #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | |
# $length = 128 | |
# $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.ToCharArray() | |
# $randomString = -join ((1..$length) | ForEach-Object { $characters | Get-Random }) | |
# $cert = New-SelfSignedCertificate -Type CodeSigning -Subject "CN=TaYaKi71751" -CertStoreLocation "Cert:\CurrentUser\My" | |
# $password = ConvertTo-SecureString -String "$randomString" -Force -AsPlainText | |
# Export-PfxCertificate -Cert $cert -FilePath "key.pfx" -Password $password | |
# Export-Certificate -Cert $cert -FilePath key.cer | |
openssl req -x509 -newkey rsa:4096 -nodes -keyout openssl.key -out openssl.crt -subj /CN=TaYaKi71751 -days 1000 | |
ls | |
flutter build windows | |
# flutter pub run msix:create --certificate-path openssl.crt --certificate-password $randomString --install-certificate false | |
flutter pub run msix:create --certificate-path openssl.crt --install-certificate false | |
- name: Save build Artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: package (EXE Files) | |
path: | | |
build\windows\x64\runner\Release\* | |
*.crt | |
# 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*' |