Skip to content

update main.yml

update main.yml #1

Workflow file for this run

name: Build and Release
on:
push:
branches:
- testbuild
jobs:
build-and-package:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install system dependencies
run: |
sudo dpkg --add-architecture i386
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y autoconf libtool nasm libiberty-dev:i386 libelf-dev:i386 libboost-dev:i386 libbsd-dev:i386 libunwind-dev:i386 lib32z1-dev libc6-dev-i386 linux-libc-dev:i386 g++-13-multilib
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
echo "Dependencies installed successfully."
- name: Clone and install AMBuild
run: |
git clone https://github.com/alliedmodders/ambuild --depth 1
cd ambuild
python -m pip install .
- name: Print Python packages and PATH
run: |
echo "Python packages:"
pip list
echo "PATH: $PATH"
echo "Python location: $(which python)"
echo "Python version: $(python --version)"
python -m site
- name: Prepare build environment
run: |
echo "export PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV
git submodule update --init --recursive
- name: Configure and build with AMBuild
run: |
./autoconfig.sh
mkdir -p build/release
cd build/release
ambuild
echo "Project built."
- name: Execute multibuild for packaging
run: |
./multibuild.sh
echo "Packaging completed."
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: build/release/*.zip
token: ${{ secrets.GITHUB_TOKEN }}
draft: true