Skip to content

Build EDuke32

Build EDuke32 #233

Workflow file for this run

name: "Build EDuke32"
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🛒 Checkout repository
id: checkout
uses: actions/checkout@v4
with:
# We need this for the 'check_tag' step.
fetch-depth: 0
- name: 🔍 Determine latest EDuke32 "Synthesis" version
id: versions
run: |
EDUKE32_VERSION="$(curl -sL https://dukeworld.com/eduke32/synthesis/latest | grep -o '[^"]*.tar.xz' | head -n 1)"
SYNTHESIS_VERSION=${EDUKE32_VERSION#"eduke32_src_"}; SYNTHESIS_VERSION=${SYNTHESIS_VERSION%".tar.xz"}
echo "synthesis=$SYNTHESIS_VERSION" >> $GITHUB_OUTPUT
shell: bash
- name: ❓ Check if we already built this version
id: check_tag
run: |
if git rev-parse --verify --quiet "refs/tags/eduke32-${{ steps.versions.outputs.synthesis }}"; then
echo "Tag already exists, we can exit early!"; echo "tag_exists=true" >> $GITHUB_OUTPUT
else
echo "Tag does not exist, let's get cracking!"; echo "tag_exists=false" >> $GITHUB_OUTPUT
fi
shell: bash
- name: 🗃️ Fetch the source code
if: steps.check_tag.outputs.tag_exists == 'false'
run: |
wget -O 'eduke32_src.tar.xz' "https://dukeworld.duke4.net/eduke32/synthesis/${{ steps.versions.outputs.synthesis }}/eduke32_src_${{ steps.versions.outputs.synthesis }}.tar.xz"
tar -xf 'eduke32_src.tar.xz' --strip-components=1 && rm 'eduke32_src.tar.xz'
shell: bash
- name: 🏗️ Build
if: steps.check_tag.outputs.tag_exists == 'false'
uses: ./.github/actions/scout
with:
variant: EDUKE32
- name: 📦️ Archive package
if: steps.check_tag.outputs.tag_exists == 'false'
run: |
7z a \
-t7z \
-m0=lzma \
-mx=9 \
-mfb=64 \
-md=32m \
-ms=on \
"EDuke32.LinuxPortable_${{ steps.versions.outputs.synthesis }}.7z" ./out/*
shell: bash
- name: 🚚 Ship
if: steps.check_tag.outputs.tag_exists == 'false'
uses: softprops/action-gh-release@v2
with:
tag_name: eduke32-${{ steps.versions.outputs.synthesis }}
name: "EDuke32 | ${{ steps.versions.outputs.synthesis }}"
body: |
![EDuke32](https://github.com/AvinashReddy3108/EDuke32.LinuxPortable/assets/27774996/9123536a-cfd2-40f5-97f8-cdbbfb15407a)
Read the changelog: https://dukeworld.com/eduke32/synthesis/${{ steps.versions.outputs.synthesis }}/ChangeLog.txt
# Notes
- The "startup screen"/GUI has been stripped out (flags: `STARTUP_WINDOW=0`, `HAVE_GTK2=0`) in favor of using shell scripts (_or maybe a third party launcher in the future?_) to launch the games. You will need to use the CLI for launching your games (see `./eduke32 --help`).
files: EDuke32.LinuxPortable_${{ steps.versions.outputs.synthesis }}.7z