-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a39c01
commit dc03692
Showing
3 changed files
with
272 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
name: Build linux | ||
on: | ||
push: | ||
workflow_dispatch: | ||
merge_group: | ||
|
||
jobs: | ||
macos-build: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@main | ||
- name: Set up Flutter | ||
uses: subosito/flutter-action@main | ||
- name: Podfile | ||
run: | | ||
cd macos | ||
rm Podfile.lock || true | ||
flutter clean | ||
flutter pub get | ||
pod install | ||
pod update | ||
- name: Build | ||
run: | | ||
flutter build macos | ||
mkdir -p target | ||
cp -R build/macos/Build/Products/Release/pak_manager.app target/ | ||
sudo chmod +x target/pak_manager.app/Contents/MacOS/pak_manager | ||
- uses: QQxiaoming/[email protected] | ||
with: | ||
name: MacOS | ||
srcdir: target | ||
- name: Save build Artifact | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: MacOS | ||
path: MacOS.dmg | ||
|
||
windows-build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@main | ||
- name: Set up Flutter | ||
uses: subosito/flutter-action@main | ||
- name: Build | ||
run: | | ||
flutter build windows | ||
Compress-Archive -Path build\windows\x64\runner\Release\* -Destination Windows.zip | ||
- name: Save build Artifact | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: Windows | ||
path: Windows.zip | ||
|
||
# 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: Zip | ||
run: | | ||
zip Linux.zip *.AppImage* | ||
- name: Save build Artifact | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: Linux | ||
path: Linux.zip | ||
|
||
release: | ||
needs: [ macos-build,windows-build,linux-build ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@main | ||
- name: | ||
id: tag | ||
run: | | ||
echo "value=$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
- uses: actions/download-artifact@main | ||
with: | ||
name: Linux | ||
path: . | ||
- uses: actions/download-artifact@main | ||
with: | ||
name: Windows | ||
path: . | ||
- uses: actions/download-artifact@main | ||
with: | ||
name: MacOS | ||
path: . | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ steps.tag.outputs.value }} | ||
release_name: Release ${{ github.ref }} | ||
body: | | ||
Changes on this release | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./MacOS.dmg | ||
asset_name: MacOS.dmg | ||
asset_content_type: application/zip | ||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./Windows.zip | ||
asset_name: Windows.zip | ||
asset_content_type: application/zip | ||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||
asset_path: ./Linux.zip | ||
asset_name: Linux.zip | ||
asset_content_type: application/zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details | ||
version: 1 | ||
script: | ||
- rm -rf AppDir || true | ||
- cp -r build/linux/*/release/bundle AppDir | ||
- mkdir -p AppDir/usr/share/icons/hicolor/64x64/apps/ | ||
- cp assets/images/logo.png AppDir/usr/share/icons/hicolor/64x64/apps/ | ||
AppDir: | ||
path: ./AppDir | ||
app_info: | ||
id: io.github.TaYaKi71751-gaming-config.pak_manager | ||
name: Palworld Pak Manager | ||
icon: logo | ||
version: latest | ||
exec: pak_manager | ||
exec_args: $@ | ||
apt: | ||
arch: amd64 | ||
allow_unauthenticated: true | ||
sources: | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal main restricted | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal universe | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates universe | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal multiverse | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-updates multiverse | ||
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse | ||
- sourceline: deb http://security.ubuntu.com/ubuntu focal-security main restricted | ||
- sourceline: deb http://security.ubuntu.com/ubuntu focal-security universe | ||
- sourceline: deb http://security.ubuntu.com/ubuntu focal-security multiverse | ||
include: | ||
- libgtk-3-0 | ||
exclude: | ||
- humanity-icon-theme | ||
- hicolor-icon-theme | ||
- adwaita-icon-theme | ||
- ubuntu-mono | ||
files: | ||
include: | ||
- lib/*.so | ||
- data | ||
exclude: | ||
- usr/share/man | ||
- usr/share/doc/*/README.* | ||
- usr/share/doc/*/changelog.* | ||
- usr/share/doc/*/NEWS.* | ||
- usr/share/doc/*/TODO.* | ||
runtime: | ||
env: | ||
GIO_MODULE_DIR: $APPDIR/usr/lib/x86_64-linux-gnu/gio/modules/ | ||
test: | ||
fedora: | ||
image: appimagecrafters/tests-env:fedora-30 | ||
command: ./pak_manager | ||
use_host_x: true | ||
debian: | ||
image: appimagecrafters/tests-env:debian-stable | ||
command: ./pak_manager | ||
use_host_x: true | ||
arch: | ||
image: appimagecrafters/tests-env:archlinux-latest | ||
command: ./pak_manager | ||
use_host_x: true | ||
centos: | ||
image: appimagecrafters/tests-env:centos-7 | ||
command: ./pak_manager | ||
use_host_x: true | ||
ubuntu: | ||
image: appimagecrafters/tests-env:ubuntu-xenial | ||
command: ./pak_manager | ||
use_host_x: true | ||
AppImage: | ||
arch: x86_64 | ||
update-information: guess | ||
sign-key: None |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.