Skip to content

Merge pull request #165 from daffyyyy/main #197

Merge pull request #165 from daffyyyy/main

Merge pull request #165 from daffyyyy/main #197

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
paths-ignore:
- '**/README.md'
- '**/.gitignore'
- '**/LICENSE'
pull_request:
branches: [ "main" ]
paths-ignore:
- '**/README.md'
- '**/.gitignore'
- '**/LICENSE'
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 }}
publish:
if: github.event_name == 'push'
permissions: write-all
runs-on: ubuntu-latest
needs: build
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: Copy skins.json
run: cp website/data/skins.json ${{ env.OUTPUT_PATH }}/skins.json
- name: Copy gloves.json
run: cp website/data/gloves.json ${{ env.OUTPUT_PATH }}/gloves.json
- name: Zip
run: zip -r "${{ env.PROJECT_NAME }}.zip" "${{ env.OUTPUT_PATH }}" gamedata/
- name: Clean files Website
run: |
rm -rf website/img/
- 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