Skip to content

Update Makefile

Update Makefile #14

Workflow file for this run

name: Build OS
on:
push:
branches:
- main
tags:
- '*'
pull_request:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install dependencies and cross-compiler
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y build-essential gcc-multilib g++-multilib nasm wget bison flex
wget https://github.com/lordmilko/i686-elf-tools/releases/download/13.2.0/i686-elf-tools-linux.zip
unzip i686-elf-tools-linux.zip -d i686-elf-tools
sudo mv i686-elf-tools /usr/local/i686-elf-tools
sudo ln -sf /usr/local/i686-elf-tools/bin/* /usr/local/bin/
i686-elf-gcc --version
i686-elf-ld --version
nasm -v
- name: Build OS
run: |
make clean
sudo ./build.sh
- name: Rename OS binary to include tag
if: startsWith(github.ref, 'refs/tags/')
run: |
mv ./bin/os.bin ./bin/os-${GITHUB_REF_NAME}.bin
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: Build OS ${{ github.ref_name }}
files: ./bin/os-${{ github.ref_name }}.bin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}