Skip to content

Commit

Permalink
Update build to use dotnet 8
Browse files Browse the repository at this point in the history
  • Loading branch information
B3none authored Sep 2, 2024
1 parent 4e0d10e commit 34ab411
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
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: 8.0.x
- name: Build
run: dotnet build
- name: Create output directory
run: |
mkdir -p output/InstadefusePlugin
mv ./bin/Debug/net7.0/InstadefusePlugin.dll output/InstadefusePlugin/
mv ./bin/Debug/net7.0/InstadefusePlugin.pdb 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
Expand All @@ -44,25 +44,21 @@ jobs:
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 asset
run: zip -r InstadefusePlugin-${{ github.sha }}.zip ./InstadefusePlugin
- name: Get release info

- name: Create release assets
run: |
RELEASE_INFO=$(curl -sH 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/${{ github.repository }}/releases)
export UPLOAD_URL=$(echo $RELEASE_INFO | jq -r ".[] | select(.tag_name == \"${{ github.event.release.tag_name }}\").upload_url")
echo "UPLOAD_URL=$UPLOAD_URL" >> $GITHUB_ENV
- name: Upload release asset
uses: actions/upload-release-asset@v1
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 }}
with:
upload_url: ${{ env.UPLOAD_URL }}
asset_path: ./InstadefusePlugin-${{ github.sha }}.zip
asset_name: "cs2-instadefuse-${{ github.event.release.tag_name }}.zip"
asset_content_type: application/zip

0 comments on commit 34ab411

Please sign in to comment.