Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
Nereziel committed Nov 14, 2023
1 parent ac671cd commit b4f8bdb
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
BUILD_NUMBER: ${{ github.run_number }}
PROJECT_PATH: "WeaponPaints.csproj"
PROJECT_NAME: "WeaponPaints"
OUTPUT_PATH: "./WeaponPaints"


jobs:
build:
permissions: write-all
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build ${{ env.PROJECT_PATH }} -c WeaponPaints -o ${{ env.OUTPUT_PATH }}
- name: Clean files
run: |
rm -f \
${{ env.OUTPUT_PATH }}/CounterStrikeSharp.API.dll \
${{ env.OUTPUT_PATH }}/McMaster.NETCore.Plugins.dll \
${{ env.OUTPUT_PATH }}/Microsoft.DotNet.PlatformAbstractions.dll \
${{ env.OUTPUT_PATH }}/Microsoft.Extensions.DependencyModel.dll
- name: Zip
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: '${{ env.PROJECT_NAME }}.zip'
path: ${{ env.OUTPUT_PATH }}
- name: Zip
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: '${{ env.PROJECT_NAME }}-Website.zip'
path: website
- name: WeaponPaints
uses: ncipollo/[email protected]
with:
artifacts: "${{ env.PROJECT_NAME }}.zip,${{ env.PROJECT_NAME }}-Website.zip"
name: "Build ${{ env.BUILD_NUMBER }}"
tag: "build-${{ env.BUILD_NUMBER }}"
body: |
Place the plugin in game/csgo/addons/counterstrikesharp/plugins/WeaponPaints
2 changes: 1 addition & 1 deletion WeaponPaints.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.50" />
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.52" />
<PackageReference Include="Nexd.MySQL" Version="1.0.1" />
</ItemGroup>

Expand Down

0 comments on commit b4f8bdb

Please sign in to comment.