generated from MechanicalFlower/godot-template
-
Notifications
You must be signed in to change notification settings - Fork 2
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
ff9d4d9
commit 483ffa3
Showing
7 changed files
with
107 additions
and
38 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,53 @@ | ||
name: AppImage Build | ||
|
||
on: | ||
workflow_dispatch: | ||
# Ensure the build works on main | ||
push: | ||
branches: [main] | ||
# Ensure the build works on each pull request | ||
pull_request: | ||
# Build and publish on release | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: extractions/setup-just@v1 | ||
|
||
- name: Load dotenv | ||
run: just ci-load-dotenv | ||
|
||
- name: Load dotenv | ||
run: just bump-version | ||
|
||
# Install FUSE (https://github.com/AppImage/AppImageKit/wiki/FUSE) | ||
- name: Install pkg2image dependencies | ||
run: | | ||
sudo add-apt-repository universe | ||
sudo apt install libfuse2 | ||
# Install pkg2appimage and build the game (https://github.com/AppImageCommunity/pkg2appimage) | ||
- name: Build AppImage | ||
run: | | ||
wget -c $(wget -q https://api.github.com/repos/AppImageCommunity/pkg2appimage/releases -O - | grep "pkg2appimage-.*-x86_64.AppImage" | grep browser_download_url | head -n 1 | cut -d '"' -f 4) | ||
chmod +x ./pkg2appimage-*.AppImage | ||
./pkg2appimage-*.AppImage public/packaging/appimage/recipe.yml | ||
- name: Rename the AppImage | ||
run: mv ./out/Marble-*.AppImage Marble.AppImage | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: Marble.AppImage | ||
|
||
# Publish, on each release | ||
- name: Publish AppImage | ||
if: ${{ env.GITHUB_EVENT_NAME == 'release' || (env.GITHUB_EVENT_NAME == 'workflow_dispatch' && startsWith(github.ref, 'refs/tags/')) }} | ||
run: | | ||
gh release upload ${{ env.game_version }} ./Marble.AppImage |
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
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
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
app: Marble | ||
|
||
ingredients: | ||
dist: trusty | ||
sources: | ||
- deb http://us.archive.ubuntu.com/ubuntu/ trusty main universe | ||
packages: | ||
- libx11-6 | ||
- libxinerama1 | ||
- libxcursor1 | ||
- libxrandr2 | ||
- libfreetype6 | ||
- libpng12-0 | ||
- libasound2 | ||
- libpulse0 | ||
- libgl1-mesa-glx | ||
- zlib1g | ||
- libgcc1 | ||
- libc6 | ||
script: | ||
# Download released builds | ||
- wget -c "https://github.com/MechanicalFlower/Marble/releases/download/1.6.0/Marble-linux-v1.6.0.zip" | ||
- unzip *.zip | ||
# Download the icon and the .desktop file | ||
- wget -c "https://raw.githubusercontent.com/MechanicalFlower/Marble/1.6.0/public/packaging/org.mechanicalflower.Marble.desktop" | ||
- wget -c "https://raw.githubusercontent.com/MechanicalFlower/Marble/1.6.0/assets/icon.png" | ||
|
||
script: | ||
- sed -i.bak -e "s,Version=.*$,,g" ../org.mechanicalflower.Marble.desktop | ||
# Replace the icon path in the desktop file | ||
- sed -i.bak -e "s,Icon=org.mechanicalflower.Marble$,Icon=/usr/share/icons/hicolor/apps/marble.png,g" ../org.mechanicalflower.Marble.desktop | ||
# Replace the exec command in the desktop file | ||
- sed -i.bak -e "s,Exec=marble-wrapper$,Exec=bin/Marble.x86_64 --main-pack bin/Marble.pck --rendering-driver opengl3,g" ../org.mechanicalflower.Marble.desktop | ||
# Copy the desktop file | ||
- mkdir -p usr/share/applications/ | ||
- cp ../org.mechanicalflower.Marble.desktop . | ||
- cp ../org.mechanicalflower.Marble.desktop usr/share/applications/org.mechanicalflower.Marble.desktop | ||
# Copy the icon | ||
- mkdir -p usr/share/icons/hicolor/apps/ | ||
- cp ../icon.png usr/share/icons/hicolor/apps/marble.png | ||
# Copy game files | ||
- mkdir -p usr/bin/ | ||
- cp ../Marble.x86_64 usr/bin/Marble.x86_64 | ||
- cp ../Marble.pck usr/bin/Marble.pck | ||
# Ensure the game is an executable | ||
- chmod +x usr/bin/Marble.x86_64 |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
|
||
[Desktop Entry] | ||
Version=1.6.0 | ||
Type=Application | ||
|
||
Name=Marble | ||
|
This file was deleted.
Oops, something went wrong.