mirror of
https://github.com/creazy231/cs2-css-flashlight.git
synced 2026-09-27 20:17:04 +02:00
Bump to CounterStrikeSharp 1.0.371 and .NET 10, replace per-tick light spawns with a parented light_barn, add plugin config, real unit tests, and refresh CI plus docs. Co-authored-by: Cursor <cursoragent@cursor.com>
82 lines
2.1 KiB
YAML
82 lines
2.1 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "*"
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
PROJECT_NAME: "Flashlight"
|
|
PROJECT_PATH: "./Flashlight/Flashlight.csproj"
|
|
OUTPUT_PATH: "./Flashlight/Flashlight"
|
|
PUBLISH_PATH: "./Flashlight/Flashlight"
|
|
DOTNET_VERSION: "10.0.x"
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
- name: Restore
|
|
run: dotnet restore
|
|
- name: Test
|
|
run: dotnet test -c Release --no-restore
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
- name: Restore
|
|
run: dotnet restore
|
|
- name: Build
|
|
run: dotnet build ${{ env.PROJECT_PATH }} -c Release -o ${{ env.OUTPUT_PATH }}
|
|
|
|
publish:
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
permissions: write-all
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
- name: Restore
|
|
run: dotnet restore
|
|
- name: Build
|
|
run: dotnet build ${{ env.PROJECT_PATH }} -c Release -o ${{ env.OUTPUT_PATH }}
|
|
- name: Clean files
|
|
run: |
|
|
rm -f \
|
|
${{ env.OUTPUT_PATH }}/Flashlight.deps.json \
|
|
${{ env.OUTPUT_PATH }}/Flashlight.pdb \
|
|
- name: Zip
|
|
uses: thedoctor0/zip-release@0.7.5
|
|
with:
|
|
type: 'zip'
|
|
filename: '${{ env.PROJECT_NAME }}.zip'
|
|
path: ${{ env.PUBLISH_PATH }}
|
|
- name: Create Release
|
|
uses: ncipollo/release-action@v1.14.0
|
|
with:
|
|
artifacts: "${{ env.PROJECT_NAME }}.zip"
|
|
name: "${{ github.ref_name }}"
|
|
tag: "${{ github.ref_name }}"
|
|
allowUpdates: true
|
|
body: |
|
|
Place the plugin in game/csgo/addons/counterstrikesharp/plugins/Flashlight
|