halflife-photomode/.forgejo/workflows/ci-cd.yml

60 lines
1.5 KiB
YAML
Raw Normal View History

2025-01-06 19:29:24 +02:00
name: CI/CD
on: [push, pull_request]
jobs:
2025-01-12 00:25:57 +02:00
build-linux:
2025-01-06 19:29:24 +02:00
name: Linux-x86-${{ matrix.compiler }}
runs-on: node-bookworm
strategy:
matrix:
compiler: [g++, clang++]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
apt update
apt install -y sudo g++-multilib clang libgl1-mesa-dev zip
- name: Build
run: |
cd linux
make COMPILER=${{ matrix.compiler }} CFG=release
- name: Package
run: |
cp -r linux/release/cl_dlls photomode/cl_dlls
cp -r linux/release/dlls photomode/dlls
mkdir dist
zip -r dist/photomode-linux.zip photomode
- name: Deploy
uses: forgejo/upload-artifact@v4
with:
name: Linux-x86-${{ matrix.compiler }}-${{ github.sha }}.zip
2025-01-12 00:25:57 +02:00
path: photomode
2025-01-06 19:29:24 +02:00
if-no-files-found: error
2025-01-12 00:25:57 +02:00
release:
name: Release
runs-on: node-bookworm
if: startsWith(github.ref, 'refs/tags/')
needs: build-linux
steps:
- name: Download artifacts
uses: forgejo/download-artifact@v4
with:
path: artifacts
merge-multiple: true
2025-01-06 19:29:24 +02:00
- name: Release
uses: actions/forgejo-release@v2
with:
url: https://code.nullprop.sh
direction: upload
2025-01-12 00:25:57 +02:00
release-dir: artifacts
tag: "${{ github.ref_name }}"
2025-01-06 19:29:24 +02:00
token: ${{ secrets.TOKEN }}