Skip to content

Commit

Permalink
Update build_release.yml
Browse files Browse the repository at this point in the history
Updated build_release.yml to include:
Building Debian Packages

Ubuntu Versions:
- 20.04
- 22.04

Architecture:
- x86_64 (amd64)
  • Loading branch information
Gregory-AM authored Mar 9, 2024
1 parent 4e0378e commit b9ede39
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,64 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.build_and_release_windows.outputs.upload_url }}

build_and_release_debian:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.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@v4
with:
fetch-depth: 0

- name: Install Python
uses: actions/setup-python@v5
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
- name: Install Dependencies (pip)
run: pip install -r requirements.txt

- name: Clone Pillow 10.2.0
run: git clone --branch=10.2.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: List Debian Packages
run: ls -l ../*.deb

- name: Get upload URL
run: 'echo "Upload URL: ${{ needs.build_and_release_windows.outputs.upload_url }}"'

- 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-v${{ env.VERSION }}-x86_64-${{ matrix.os }}.deb
asset_content_type: application/x-deb
asset_path: ./overviewer-${{ env.VERSION }}-LINUX.tar.xz
asset_name: overviewer-${{ env.VERSION }}-LINUX.tar.xz
asset_content_type: application/x-xz
Expand Down

0 comments on commit b9ede39

Please sign in to comment.