Ensure csproj is using dotnet 8 #44
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 the plugin | |
on: | |
push: | |
branches: [ "master" ] | |
paths: | |
- '**.cs' | |
- '**.csproj' | |
pull_request: | |
branches: [ "master" ] | |
paths: | |
- '**.cs' | |
- '**.csproj' | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build | |
run: dotnet build | |
- name: Create output directory | |
run: | | |
mkdir -p output/InstadefusePlugin | |
mv ./bin/Debug/net8.0/InstadefusePlugin.dll output/InstadefusePlugin/ | |
mv ./bin/Debug/net8.0/InstadefusePlugin.pdb output/InstadefusePlugin/ | |
mv ./lang output/InstadefusePlugin/ | |
- name: Publish artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: InstadefusePlugin-${{ github.sha }} | |
path: output | |
release: | |
needs: build | |
permissions: write-all | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' | |
steps: | |
- name: Download build artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: InstadefusePlugin-${{ github.sha }} | |
- name: Create release assets | |
run: | | |
zip -r cs2-instadefuse-${{ github.event.release.tag_name }}.zip ./addons | |
- name: Upload release assets | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
./cs2-instadefuse-shared-${{ github.event.release.tag_name }}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |