aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-06-18 19:46:59 +0200
committerAstatin <[email protected]>2025-06-18 19:46:59 +0200
commita82b9ba9e92a188fd2bf2be85384414a4121d119 (patch)
treeff34c98f6d08014036c785eb54f8e0ee234033d7 /.github
parent27617209a324f03a11faecc74392b048f08b45ae (diff)
Add build script for building a self containing linux executable
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/game.yml40
1 files changed, 40 insertions, 0 deletions
diff --git a/.github/workflows/game.yml b/.github/workflows/game.yml
new file mode 100644
index 0000000..b0bc5df
--- /dev/null
+++ b/.github/workflows/game.yml
@@ -0,0 +1,40 @@
+name: Game
+
+on:
+ push:
+ branches: [ "main" ]
+ pull_request:
+ branches: [ "main" ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Download makeself
+ run: wget https://github.com/megastep/makeself/releases/download/release-2.5.0/makeself-2.5.0.run
+ - name: Extract makeself
+ run: sh ./makeself-2.5.0.run
+
+ - name: Download assembler
+ run: wget https://github.com/AstatinChan/gameboy-asm/releases/download/latest/gbasm_linux-x86_64
+ - name: Make assembler executable
+ run: chmod +x gbasm_linux-x86_64
+
+ - name: Build ROM
+ run: make GBASM=./gbasm_linux-x86_64 build/main.rom && cp build/main.rom main.gb
+ - name: Build Linux Makeself Executable
+ run: make GBASM=./gbasm_linux-x86_64 MAKESELF=./makeself-2.5.0/makeself.sh build/game_linux_x86-64 && cp build/game_linux_x86-64 .
+
+ - uses: "marvinpinto/action-automatic-releases@latest"
+ with:
+ repo_token: "${{ secrets.GITHUB_TOKEN }}"
+ automatic_release_tag: "latest"
+ prerelease: true
+ title: "Development Build"
+ files: |
+ game_linux_x86-64
+ main.gb