Skip to content

update build

update build #11

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "master", "actions" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 4.8
- name: Install .NET Framework 4.8 Developer Pack
run: |
choco install netfx-4.8-devpack
- name: Build
run: |
cd Magitek
dotnet msbuild Magitek.csproj /t:build /p:Configuration=Release
- name: Install GitVersion
run: dotnet tool install --global GitVersion.Tool
- name: Generate Version
run: gitversion /output json /output buildserver
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v$(GitVersion.SemVer)
release_name: Release v$(GitVersion.SemVer)
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Magitek/bin/Release/net48/Magitek.dll
asset_name: Magitek.dll
asset_content_type: application/octet-stream