tuxdock/.forgejo/workflows/build.yaml

38 lines
1,005 B
YAML
Raw Normal View History

2025-11-03 16:20:39 -05:00
name: Build & Upload tux-dock
2025-11-03 17:42:48 -05:00
on:
push:
branches:
- main
- dev
jobs:
build:
runs-on: [self-hosted]
steps:
2025-11-03 17:42:48 -05:00
- name: Clone current branch
run: |
2025-11-03 17:42:48 -05:00
git clone --branch ${{ github.ref_name }} https://mentalnet.xyz/forgejo/markmental/tuxdock.git .
echo "✅ Checked out branch ${{ github.ref_name }}"
- name: Compile tux-dock
run: |
2025-11-03 16:20:39 -05:00
g++ -std=c++17 main.cpp -o tux-dock
2025-11-03 17:42:48 -05:00
chmod +x tux-dock
echo "🎉 tux-dock successfully compiled and marked executable!"
- name: Verify build
2025-11-03 16:22:28 -05:00
run: file tux-dock
2025-11-03 16:20:39 -05:00
2025-11-03 17:42:48 -05:00
- name: Prepare artifact directory
run: |
mkdir -p build/${{ github.ref_name }}
mv tux-dock build/${{ github.ref_name }}/
echo "📁 Prepared build directory: build/${{ github.ref_name }}/tux-dock"
- name: Upload build artifact
2025-11-03 16:22:28 -05:00
uses: actions/upload-artifact@v3
2025-11-03 16:20:39 -05:00
with:
2025-11-03 17:31:42 -05:00
name: tux-dock-linux-x86_64
2025-11-03 17:42:48 -05:00
path: build/