initial commit
All checks were successful
CI / build (push) Successful in 32s
CI / release (push) Successful in 32s
CI / lint (push) Successful in 30s

This commit is contained in:
Kamal Tufekcic 2026-07-05 13:28:35 +03:00
commit d701598350
67 changed files with 9351 additions and 0 deletions

66
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,66 @@
name: CI
on:
push:
branches: [master]
tags: ['v*']
pull_request:
jobs:
lint:
runs-on: self-hosted-x86
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- run: dotnet restore Outnumbered.slnx
- name: Format check
run: dotnet format Outnumbered.slnx --verify-no-changes --no-restore
build:
runs-on: self-hosted-x86
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- run: dotnet restore Outnumbered.slnx
- name: Build (SQLite dev config) + test
run: |
dotnet build Outnumbered.slnx -c Release --no-restore
dotnet test Outnumbered.slnx -c Release --no-build
- name: Build (Postgres-only release config)
run: dotnet build Outnumbered/outnumbered.csproj -c Release -p:WithSqlite=false --no-restore
release:
needs: [lint, build]
if: startsWith(github.ref, 'refs/tags/v')
runs-on: self-hosted-x86
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Package (Postgres-only for production)
run: |
set -eu
VERSION="${GITHUB_REF_NAME#v}"
PKG="outnumbered-${VERSION}"
dotnet publish Outnumbered/outnumbered.csproj -c Release -p:WithSqlite=false \
-o "${PKG}/addons/counterstrikesharp/plugins/outnumbered"
cp README.md LICENSE "${PKG}/"
mkdir -p dist
tar -czf "dist/${PKG}.tar.gz" "${PKG}"
- name: Publish Forgejo release
uses: https://code.forgejo.org/actions/forgejo-release@v2
with:
direction: upload
url: ${{ github.server_url }}
repo: ${{ github.repository }}
tag: ${{ github.ref_name }}
release-dir: dist
token: ${{ secrets.GITHUB_TOKEN }}
override: true
release-notes: "Outnumbered ${{ github.ref_name }} — Postgres-only build. Extract `addons/` into <cs2>/game/csgo/; see README. SQLite single-server build: compile with -p:WithSqlite=true."