0.10.63b0 #38
Workflow file for this run
This file contains hidden or 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 Flatpak | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| deploy: | |
| runs-on: ${{ matrix.cfg.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cfg: | |
| - {os: ubuntu-24.04, python-version: '3.13', architecture: x64} | |
| steps: | |
| - name: Clone | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.cfg.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.cfg.python-version }} | |
| - name: Setup cmake | |
| uses: jwlawson/actions-setup-cmake@v2 | |
| - name: Build Wheels | |
| run: | | |
| sudo apt-get install libgtk-3-dev | |
| export BDISTWHEELFREEZELIBS=true | |
| pip wheel --wheel-dir installer/wheels https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-24.04/wxpython-4.2.5-cp313-cp313-linux_x86_64.whl . | |
| - name: Build Flatpak | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y flatpak | |
| sudo apt-get install -y flatpak-builder | |
| flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo | |
| TAG="${{ github.event.release.tag_name }}" | |
| TAG="${TAG//./_}" | |
| # Create desktop file | |
| cat << EOF > installer/com.amuletmc.amulet_map_editor_${TAG}.desktop | |
| [Desktop Entry] | |
| Type=Application | |
| Name=Amulet ${{ github.event.release.tag_name }} | |
| Comment=A Minecraft world editor and converter that supports all versions since Java 1.12 and Bedrock 1.7. | |
| Exec=amulet_map_editor | |
| Icon=com.amuletmc.amulet_map_editor_${TAG} | |
| EOF | |
| sed "s/com.amuletmc.amulet_map_editor/com.amuletmc.amulet_map_editor_${TAG}/g" installer/com.amuletmc.amulet_map_editor.yml > "installer/com.amuletmc.amulet_map_editor_${TAG}.yml" | |
| flatpak-builder --force-clean --user --install-deps-from=flathub --repo=repo --install builddir installer/com.amuletmc.amulet_map_editor_${TAG}.yml | |
| mkdir -p installer/dist | |
| flatpak build-bundle repo installer/dist/Amulet-${{ github.event.release.tag_name }}-flatpak-${{ matrix.cfg.architecture }}.flatpak com.amuletmc.amulet_map_editor_${TAG} --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo | |
| - name: Upload Release Asset | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Amulet-${{ github.event.release.tag_name }}-flatpak-${{ matrix.cfg.architecture }} | |
| path: ./installer/dist |