mirror of
https://github.com/creazy231/cs2-css-flashlight.git
synced 2026-09-27 20:17:04 +02:00
🔦 Modernize flashlight for CSS/.NET 10
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>
This commit is contained in:
parent
081278a8ae
commit
a0ef6311ee
13 changed files with 847 additions and 434 deletions
50
.github/workflows/build.yml
vendored
50
.github/workflows/build.yml
vendored
|
|
@ -2,48 +2,64 @@ name: Build
|
|||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "*"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
BUILD_NUMBER: ${{ github.tag }}
|
||||
PROJECT_NAME: "Flashlight"
|
||||
PROJECT_PATH: "./Flashlight/Flashlight.csproj"
|
||||
OUTPUT_PATH: "./Flashlight/Flashlight"
|
||||
PUBLISH_PATH: "./Flashlight/Flashlight"
|
||||
|
||||
DOTNET_VERSION: "10.0.x"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
permissions: write-all
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
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 Flashlight -o ${{ env.OUTPUT_PATH }}
|
||||
run: dotnet build ${{ env.PROJECT_PATH }} -c Release -o ${{ env.OUTPUT_PATH }}
|
||||
|
||||
publish:
|
||||
if: github.event_name == 'push'
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
permissions: write-all
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
- name: Restore
|
||||
run: dotnet restore
|
||||
- name: Build
|
||||
run: dotnet build ${{ env.PROJECT_PATH }} -c Flashlight -o ${{ env.OUTPUT_PATH }}
|
||||
run: dotnet build ${{ env.PROJECT_PATH }} -c Release -o ${{ env.OUTPUT_PATH }}
|
||||
- name: Clean files
|
||||
run: |
|
||||
rm -f \
|
||||
|
|
@ -56,11 +72,11 @@ jobs:
|
|||
filename: '${{ env.PROJECT_NAME }}.zip'
|
||||
path: ${{ env.PUBLISH_PATH }}
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1.12.0
|
||||
uses: ncipollo/release-action@v1.14.0
|
||||
with:
|
||||
artifacts: "${{ env.PROJECT_NAME }}.zip"
|
||||
name: "${{ env.BUILD_NUMBER }}"
|
||||
tag: "${{ env.BUILD_NUMBER }}"
|
||||
name: "${{ github.ref_name }}"
|
||||
tag: "${{ github.ref_name }}"
|
||||
allowUpdates: true
|
||||
body: |
|
||||
Place the plugin in game/csgo/addons/counterstrikesharp/plugins/Flashlight
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue