Skip to content

Update image link in README.md #88

Update image link in README.md

Update image link in README.md #88

Workflow file for this run

name: Build and Release Project
on:
push:
branches:
- main
env:
VERSION: 1.21.3-rc.1
jobs:
build_and_release_windows:
runs-on: windows-2022
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && vars.START_BUILD == 'True'
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.8
- name: Create Release Tag
run: |
git tag ${{ env.VERSION }}
git push origin ${{ env.VERSION }}
- name: Install dependencies (pip)
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Fetch Pillow files
run: |
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/python-pillow/Pillow/10.3.0/src/libImaging/Imaging.h" -OutFile "Imaging.h"
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/python-pillow/Pillow/10.3.0/src/libImaging/ImagingUtils.h" -OutFile "ImagingUtils.h"
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/python-pillow/Pillow/10.3.0/src/libImaging/ImPlatform.h" -OutFile "ImPlatform.h"
- name: Build Overviewer for Windows
run: |
python setup.py build
pyinstaller overviewer.spec
- name: Create ZIP archive for Windows
run: |
Compress-Archive -Path .\dist\overviewer -DestinationPath overviewer-${{ env.VERSION }}-windows.zip
- name: Create Release Notes
uses: johnyherangi/create-release-notes@main
id: create-release-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create release for Windows
id: create_release_windows
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: The Minecraft Overviewer ${{ env.VERSION }}
body: ${{ steps.create-release-notes.outputs.release-notes }}
draft: false
prerelease: true
- name: Upload Windows release asset
id: upload_windows_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release_windows.outputs.upload_url }}
asset_path: ./overviewer-${{ env.VERSION }}-windows.zip
asset_name: overviewer-${{ env.VERSION }}-windows.zip
asset_content_type: application/zip
outputs:
upload_url: ${{ steps.create_release_windows.outputs.upload_url }}
build_and_release_linux:
runs-on: ubuntu-22.04
needs: build_and_release_windows
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && vars.START_BUILD == 'True'
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.8
- name: Install dependencies (pip)
run: pip install -r requirements.txt
- name: Fetch Pillow files
run: |
curl -o Imaging.h https://raw.githubusercontent.com/python-pillow/Pillow/10.3.0/src/libImaging/Imaging.h
curl -o ImagingUtils.h https://raw.githubusercontent.com/python-pillow/Pillow/10.3.0/src/libImaging/ImagingUtils.h
curl -o ImPlatform.h https://raw.githubusercontent.com/python-pillow/Pillow/10.3.0/src/libImaging/ImPlatform.h
- name: Build Overviewer for Linux
run: |
uname -m
python setup.py build
pyinstaller overviewer.spec
- name: Create tar.xz archive for Linux
run: |
cd dist
tar -cf overviewer-${{ env.VERSION }}-linux.tar overviewer
xz -z overviewer-${{ env.VERSION }}-linux.tar
mv overviewer-${{ env.VERSION }}-linux.tar.xz ../overviewer-${{ env.VERSION }}-linux.tar.xz
- name: Get upload URL
run: 'echo "Upload URL: ${{ needs.build_and_release_windows.outputs.upload_url }}"'
- name: Upload Linux release asset
id: upload_linux_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.build_and_release_windows.outputs.upload_url }}
asset_path: ./overviewer-${{ env.VERSION }}-linux.tar.xz
asset_name: overviewer-${{ env.VERSION }}-linux.tar.xz
asset_content_type: application/x-xz
build_and_release_debian:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
needs: build_and_release_windows
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && vars.START_BUILD == 'True'
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v6
with:
python-version: 3.8
- name: Install Dependencies (apt)
run: |
sudo apt-get update -y
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install zlib1g-dev libjpeg-dev devscripts python3-all-dev debhelper python3-pil python3-numpy dh-python build-essential
- name: Install Dependencies (pip)
run: pip install -r requirements.txt
- name: Clone Pillow 10.3.0
run: git clone --branch=10.3.0 --depth=1 https://github.com/python-pillow/Pillow.git /tmp/pillow_checkout
- name: Build Extension
run: env PIL_INCLUDE_DIR=/tmp/pillow_checkout/src/libImaging/ python setup.py build
- name: Create .deb changelog
run: |
export VERSION=$(python3 setup.py --version)
export DATE=$(date -u +'%a, %d %b %Y %H:%M:%S %z')
envsubst < debian/changelog.in > debian/changelog
- name: Build .deb package
run: env DEB_BUILD_OPTIONS=nocheck debuild -i -us -uc -b -Zxz
- name: Upload Debian Package release asset
id: upload_debian_package
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.build_and_release_windows.outputs.upload_url }}
asset_path: ../the-minecraft-overviewer_${{ env.VERSION }}-0_amd64.deb
asset_name: overviewer-${{ env.VERSION }}-x86_64-${{ matrix.os }}.deb
asset_content_type: application/x-deb
build_and_release_appimage:
runs-on: ubuntu-latest
needs: build_and_release_windows
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && vars.START_BUILD == 'True'
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Build AppImage
run: |
docker run --rm -v ${{ github.workspace }}:/workspace centos:7 bash -c "
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && \
yum install -y git make automake gcc gcc-c++ patch zlib-devel bzip2-devel libffi-devel ncurses-devel readline-devel openssl-devel curl file && \
git clone https://github.com/pyenv/pyenv.git /workspace/.pyenv && \
echo 'export PYENV_ROOT=\"/workspace/.pyenv\"' >> /root/.bashrc && \
echo 'export PATH=\"\$PYENV_ROOT/bin:\$PATH\"' >> /root/.bashrc && \
echo 'eval \"\$(pyenv init --path)\"' >> /root/.bashrc && \
source /root/.bashrc && \
/workspace/.pyenv/bin/pyenv install 3.8.10 && \
/workspace/.pyenv/bin/pyenv global 3.8.10 && \
curl -o /workspace/Imaging.h https://raw.githubusercontent.com/python-pillow/Pillow/10.3.0/src/libImaging/Imaging.h && \
curl -o /workspace/ImagingUtils.h https://raw.githubusercontent.com/python-pillow/Pillow/10.3.0/src/libImaging/ImagingUtils.h && \
curl -o /workspace/ImPlatform.h https://raw.githubusercontent.com/python-pillow/Pillow/10.3.0/src/libImaging/ImPlatform.h && \
pip install -r /workspace/requirements.txt && \
cd /workspace && \
python setup.py build && \
pyinstaller overviewer.spec && \
mv /workspace/dist/overviewer /workspace/Overviewer.AppDir && \
curl -L -o /workspace/appimagetool-x86_64.AppImage \"https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage\" && \
if [ -f /workspace/appimagetool-x86_64.AppImage ]; then \
chmod +x /workspace/appimagetool-x86_64.AppImage; \
else \
echo 'Error: appimagetool-x86_64.AppImage not downloaded.'; exit 1; \
fi && \
/workspace/appimagetool-x86_64.AppImage --appimage-extract
mv /workspace/squashfs-root /workspace/appimagetool
ARCH=x86_64 /workspace/appimagetool/AppRun ./Overviewer.AppDir overviewer-${{ env.VERSION }}-x86_64.AppImage
"
- name: Create AppImage release asset
id: upload_centos_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.build_and_release_windows.outputs.upload_url }}
asset_path: ./overviewer-${{ env.VERSION }}-x86_64.AppImage
asset_name: overviewer-${{ env.VERSION }}-x86_64.AppImage
asset_content_type: application/octet-stream