This repository has been archived by the owner on Apr 10, 2024. It is now read-only.
fix: build now uses the correct zip name and plugin name #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: ['main'] | |
paths-ignore: | |
- '**/README.md' | |
pull_request: | |
branches: ['main'] | |
paths-ignore: | |
- '**/README.md' | |
workflow_dispatch: | |
env: | |
BUILD_NUMBER: ${{ github.run_number }} | |
PROJECT_PATH: 'CS2-Multi-1v1.csproj' | |
PROJECT_NAME: 'CS2-Multi-1v1' | |
OUTPUT_PATH: './CS2-Multi-1v1' | |
jobs: | |
build: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore | |
run: dotnet restore | |
- name: Build | |
run: dotnet build ${{ env.PROJECT_PATH }} -c CS2-Multi-1v1 -o ${{ env.OUTPUT_PATH }} | |
publish: | |
if: github.event_name == 'push' | |
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: 8.0.x | |
- name: Restore | |
run: dotnet restore | |
- name: Build | |
run: dotnet build ${{ env.PROJECT_PATH }} -c CS2-Multi-1v1 -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: CS2-Multi-1v1 | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: '${{ env.PROJECT_NAME }}.zip' | |
name: 'Build ${{ env.BUILD_NUMBER }}' | |
tag: 'build-${{ env.BUILD_NUMBER }}' | |
body: | | |
Place the plugin in game/csgo/addons/counterstrikesharp/plugins/CS2-Multi-1v1 | |
Note: This is a development build and may not be stable. |